GraphQL Queries
yStore registers a set of GraphQL queries through YuiCraftPlugin. These cover everything from browsing products to reading a customer's order history and cart state. All queries are read-only and return typed objects defined in the plugin's GraphQL schema.
Query categories
| Category | Description |
|---|---|
| Product Queries | List products, fetch a single product, or count products matching a filter. |
| Cart Queries | Retrieve an active guest or customer cart by ID, including items and totals. |
| Checkout Queries | Fetch available shipping methods, payment methods, and checkout agreements. |
| Customer Queries | Read customer group data, wishlist items, saved addresses, and email availability. |
| Purchase Queries | Retrieve past orders for authenticated customers or guests by order token. |
All registered query operations
| Operation | Category | Description |
|---|---|---|
products | Product | List products with filtering, sorting, and pagination. |
product | Product | Fetch a single product by handle, ID, or other arguments. |
productCount | Product | Count products matching a filter — use with products for pagination. |
cart | Cart | Fetch a cart by cartId, returning items, totals, and addresses. |
allCartRules | Cart | List all active cart price rules. |
checkoutAgreements | Checkout | Return the terms/agreements the customer must accept before placing an order. |
checkoutPaymentMethods | Checkout | List available payment methods for the current cart. |
checkoutShippingMethods | Checkout | List available shipping methods for the current cart. |
allCustomerGroups | Customer | Return all customer groups defined in the store. |
isEmailAvailable | Customer | Check whether an email address is available for new account registration. |
wishlistItems | Customer | Return wishlist items for the currently authenticated customer. |
allCustomerAddresses | Customer | Return all saved addresses for the authenticated customer. |
getCustomerOrders | Purchase | Return the order history for the authenticated customer. |
getOrder | Purchase | Fetch a single order by ID for the authenticated customer. |
getGuestOrder | Purchase | Fetch a guest order by order number and email. |
tip
Use productCount with the same arguments as products to get accurate pagination totals without fetching full product data twice.
Source files
Queries are registered from:
src/gql/queries/Product.phpsrc/gql/queries/cart/src/gql/queries/checkout/src/gql/queries/customer/src/gql/queries/purchase/