List Orders
Lists every order across all customers — the data behind the admin Sales → Orders screen.
Operation
| Operation | Type | Purpose |
|---|---|---|
adminOrders | Query | Cursor-paginated list of all orders |
Details
- Requires an admin Bearer token in the
Authorizationheader. - Cursor pagination — pass
firstfor the page size andafter(theendCursorfrom the previous page) to advance.pageInfo.hasNextPagetells you when to stop;totalCountis the grand total. - Each
nodecarries every flat order field shown in the example (incrementId,status,statusLabel,channelId/channelName,customerId/customerEmail/customerName,paymentTitle,couponCode,totalItemCount,totalQtyOrdered,orderCurrencyCode,grandTotal/baseGrandTotal/formattedGrandTotal,location,createdAt,updatedAt) plusitems— a lightweight preview connection. Sub-select it withitems { edges { node { _id sku name qtyOrdered productImage } } }. Heavy relations (full line items, invoices, shipments) are not embedded here — fetch a single order's detail for those. - The REST equivalent (
GET /api/admin/orders) uses offset pagination with a{ data, meta }envelope instead of cursors, and returnsitemsas a flat array (same fields).
Filtering
Pass any of these arguments alongside first / after to narrow the list (they mirror the admin datagrid filters):
| Argument | Description |
|---|---|
order_id | Order increment ID — partial match |
status | pending, pending_payment, processing, completed, canceled, closed, fraud |
grand_total | Exact grand total (matched against the base grand total) |
grand_total_from, grand_total_to | Grand total range (minimum / maximum) |
channel | Channel ID |
customer | Customer name — partial match |
email | Customer email — partial match |
date_range | Preset: today, yesterday, this_week, this_month, last_month, last_three_months, last_six_months, this_year |
date_from, date_to | Custom date range (Y-m-d) — overrides date_range |
sort, order | Sort field + asc / desc (default created_at desc) |

