query_records
Fetch records from any Gadget model using filtering, sorting, pagination cursors, and field selection. Inspect filters first to build valid queries.
Instructions
Query records from any Gadget model. Supports filtering, sorting, pagination cursors, and field selection (all scalar fields by default). Use introspect_filters to see valid filter shapes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort value — array of sort objects, e.g. [{ createdAt: { sortOrder: "Descending" } }] | |
| after | No | Pagination cursor — pass the endCursor from a previous response to fetch the next page | |
| limit | No | Max records to return (default 10, max 50) | |
| model | Yes | Model name in singular camelCase, e.g. shopifyOrder, label | |
| fields | No | GraphQL field selection, e.g. "id name email createdAt". Omit or use "*" for every scalar field; mix with relations like "* customer { email }". | |
| filter | No | Filter value — use introspect_filters to discover valid filter fields and shapes. |