Skip to main content
Version: 2.0.0

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

CategoryDescription
Product QueriesList products, fetch a single product, or count products matching a filter.
Cart QueriesRetrieve an active guest or customer cart by ID, including items and totals.
Checkout QueriesFetch available shipping methods, payment methods, and checkout agreements.
Customer QueriesRead customer group data, wishlist items, saved addresses, and email availability.
Purchase QueriesRetrieve past orders for authenticated customers or guests by order token.

All registered query operations

OperationCategoryDescription
productsProductList products with filtering, sorting, and pagination.
productProductFetch a single product by handle, ID, or other arguments.
productCountProductCount products matching a filter — use with products for pagination.
cartCartFetch a cart by cartId, returning items, totals, and addresses.
allCartRulesCartList all active cart price rules.
checkoutAgreementsCheckoutReturn the terms/agreements the customer must accept before placing an order.
checkoutPaymentMethodsCheckoutList available payment methods for the current cart.
checkoutShippingMethodsCheckoutList available shipping methods for the current cart.
allCustomerGroupsCustomerReturn all customer groups defined in the store.
isEmailAvailableCustomerCheck whether an email address is available for new account registration.
wishlistItemsCustomerReturn wishlist items for the currently authenticated customer.
allCustomerAddressesCustomerReturn all saved addresses for the authenticated customer.
getCustomerOrdersPurchaseReturn the order history for the authenticated customer.
getOrderPurchaseFetch a single order by ID for the authenticated customer.
getGuestOrderPurchaseFetch 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.php
  • src/gql/queries/cart/
  • src/gql/queries/checkout/
  • src/gql/queries/customer/
  • src/gql/queries/purchase/