Skip to content

List Bookings (Datagrid) ​

GraphQL counterpart of GET /api/admin/bookings. Returns a cursor-paginated list of bookings — the same rows shown on the admin Sales → Bookings datagrid. Every booking column plus the linked order and orderItem summaries are populated on each row, so the field set is identical to Booking Detail.

Operation ​

adminBookings(first, after, id, order_id, qty, product_id, from_from, from_to, to_from, to_to, created_at_from, created_at_to, sort, order) — a cursor QueryCollection. Every REST query parameter is also exposed as a GraphQL argument; see the REST page for the full argument table.

Permission ​

sales.bookings.view

Order objects are returned whole ​

order and orderItem are returned as JSON — query them bare, without a sub-selection (order, not order { … }). The whole object comes back. See Booking Detail for the keys inside each.

Fields ​

Every field is populated on each row (the booking columns, the booking sub-type, the two time-window representations, and the order / orderItem summary objects). The booking window is exposed two ways: from / to are raw unix timestamps (integers), and fromFormatted / toFormatted are the same instants pre-rendered as d M, Y H:iA strings (e.g. "20 May, 2026 12:00PM"). For non-time-based booking sub-types all four can be null. The full per-field reference is on the Booking Detail page.

Listing vs. fetching one ​

The listing already carries the full payload — fetching a single booking by id (adminBooking(id:)) is only needed when you already hold a booking id and want just that record. Typical flow: list with adminBookings, read _id from the row you want, then fetch the full record with adminBooking(id:).

Released under the MIT License.