Every GraphQL document the storefront sends to Magento is defined in the engine, one folder per feature underpackages/engine/src/features/. Each feature declares its operations in operations.ts:
- Browser operations are on the /api/graphql allowlist: client components may run them.
- Server-only operations are kept off the allowlist. Only server components and API routes run them, over the private network.
A feature also lists the companion modules whose fields its documents select. The schema drift test checks those fields against the modules' vendored schemas, so a storefront can't ship a query its backend would reject.
Generated from the engine source: 24 features, 141 operations.
auth
Customer accounts, tokens, email confirmation and password reset.
Needs: Magenx_SocialLoginGraphQl
| Operation | Runs | Description |
|---|
ConfirmEmail mutation | browser | Activate an account created while "Require Emails Confirmation" is on. CONFIRM_EMAILDocument mutation ConfirmEmail($email: String!, $key: String!) {
confirmEmail(input: { email: $email, confirmation_key: $key }) {
customer {
email
}
}
}
Activate an account created while "Require Emails Confirmation" is on. The key comes from the link in Magento's confirmation email; that link carries the customer id, not the email, so the shopper types the email. |
CreateCustomer mutation | browser | CREATE_CUSTOMERDocument mutation CreateCustomer(
$firstname: String!
$lastname: String!
$email: String!
$password: String!
$is_subscribed: Boolean
$taxvat: String
) {
createCustomer(
input: {
firstname: $firstname
lastname: $lastname
email: $email
password: $password
is_subscribed: $is_subscribed
taxvat: $taxvat
}
) {
customer {
firstname
lastname
email
}
}
}
|
GenerateCustomerToken mutation | browser | GENERATE_CUSTOMER_TOKENDocument mutation GenerateCustomerToken($email: String!, $password: String!) {
generateCustomerToken(email: $email, password: $password) {
token
}
}
|
RequestPasswordResetEmail mutation | browser | REQUEST_PASSWORD_RESET_EMAILDocument mutation RequestPasswordResetEmail($email: String!) {
requestPasswordResetEmail(email: $email)
}
|
ResendConfirmationEmail mutation | browser | Send a fresh confirmation email. RESEND_CONFIRMATION_EMAILDocument mutation ResendConfirmationEmail($email: String!) {
resendConfirmationEmail(email: $email)
}
Send a fresh confirmation email. Public and email-sending: Turnstile-gated. |
ResetCustomerPassword mutation | browser | RESET_CUSTOMER_PASSWORDDocument mutation ResetCustomerPassword(
$email: String!
$resetPasswordToken: String!
$newPassword: String!
) {
resetPassword(
email: $email
resetPasswordToken: $resetPasswordToken
newPassword: $newPassword
)
}
|
RevokeCustomerToken mutation | browser | REVOKE_CUSTOMER_TOKENDocument mutation RevokeCustomerToken {
revokeCustomerToken {
result
}
}
|
SocialLogin mutation | server only | Exchange a provider-signed ID token for a Magento customer token (find-or- create by the token's verified email). SOCIAL_LOGINDocument mutation SocialLogin(
$secret: String!
$idToken: String!
$firstname: String
$lastname: String
) {
socialLogin(
input: { secret: $secret, idToken: $idToken, firstname: $firstname, lastname: $lastname }
) {
token
created
}
}
Exchange a provider-signed ID token for a Magento customer token (find-or- create by the token's verified email). Backed by the Magenx_SocialLoginGraphQl companion module, which verifies the token against the issuer's own JWKS before it will mint anything — this document does not assert an identity, it relays one.
firstname/lastname are a display-name fallback for a token with no name claims (Apple puts the name in the authorization callback, not the token). They never decide which account is matched.
SERVER-ONLY: this is gated by a shared secret and is called server-to-server by the Next.js OAuth broker (bypassing the /api/graphql proxy). It must NOT be added to the proxy's persisted-query allowlist or run from the browser — the secret would be in the bundle the moment it were. Mints a customer token, gated by a shared secret. MUST never be reachable from the browser: it is called server-to-server by the social-login bridge only, and allowlisting it would put that secret in the client bundle. |
blog
Blog posts, tags, categories and post-product relations.
Needs: Magenx_BlogGraphQl
| Operation | Runs | Description |
|---|
GetBlogPost query | server only | Fetch a single blog post (with full detail + relations) by its url_key. GET_BLOG_POSTDocument query GetBlogPost($urlKey: String!) {
blogPost(urlKey: $urlKey) {
${BLOG_POST_DETAIL_FIELDS}
}
}
Fetch a single blog post (with full detail + relations) by its url_key. Every blog list/detail query is server-only: nothing in the browser queries the blog directly, it all goes through catalog.ts's getBlogPosts / getBlogPostByUrlKey / getBlogTagByUrlKey / getBlogPostsByCategory / getBlogRelatedPosts helpers. |
GetBlogPosts query | server only | Fetch a paginated list of blog posts, optionally filtered server-side. GET_BLOG_POSTSDocument query GetBlogPosts($pageSize: Int, $currentPage: Int, $filter: BlogPostFilterInput) {
blogPosts(pageSize: $pageSize, currentPage: $currentPage, filter: $filter) {
total_count
items {
${BLOG_POST_CARD_FIELDS}
}
}
}
Fetch a paginated list of blog posts, optionally filtered server-side. |
GetBlogPostsByCategory query | server only | Blog posts assigned to a given category — server-side filtered. GET_BLOG_POSTS_BY_CATEGORYDocument query GetBlogPostsByCategory($categoryId: Int!, $pageSize: Int, $currentPage: Int) {
blogPosts(filter: { category_id: $categoryId }, pageSize: $pageSize, currentPage: $currentPage) {
total_count
items {
${BLOG_POST_CARD_FIELDS}
}
}
}
Blog posts assigned to a given category — server-side filtered. |
GetBlogPostsByProduct query | server only | Blog posts with a given product SKU in their related products — server-side filtered, backs the "articles about this product" section on a product page. GET_BLOG_POSTS_BY_PRODUCTDocument query GetBlogPostsByProduct($sku: String!, $pageSize: Int) {
blogPosts(filter: { sku: $sku }, pageSize: $pageSize) {
items {
${BLOG_POST_CARD_FIELDS}
}
}
}
Blog posts with a given product SKU in their related products — server-side filtered, backs the "articles about this product" section on a product page. |
GetBlogTagByUrlKey query | server only | Fetch a single blog tag (and the published posts assigned to it) by url_key, for the /blog/tag/[key] route. GET_BLOG_TAG_BY_URL_KEYDocument query GetBlogTagByUrlKey($urlKey: String!) {
blogTag(urlKey: $urlKey) {
tag_id
name
url_key
description
meta_title
meta_description
posts {
items {
${BLOG_POST_CARD_FIELDS}
}
}
}
}
Fetch a single blog tag (and the published posts assigned to it) by url_key, for the /blog/tag/[key] route. |
cart
Guest and customer carts, coupons, cross-sells.
Needs: Magenx_DealGraphQl, Magenx_GaranGraphQl, Magenx_PriceHistoryGraphQl, Magenx_StripePaymentsGraphQl
| Operation | Runs | Description |
|---|
AddProductsToCart mutation | browser | ADD_PRODUCTS_TO_CARTDocument mutation AddProductsToCart($cartId: String!, $cartItems: [CartItemInput!]!) {
addProductsToCart(cartId: $cartId, cartItems: $cartItems) {
cart {
id
total_quantity
items {
...CartItemFields
}
prices {
subtotal_excluding_tax { value currency }
subtotal_including_tax { value currency }
applied_taxes { label amount { value currency } }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
user_errors {
code
message
}
}
}
${CART_ITEM_FIELDS}
|
ApplyCouponToCart mutation | browser | APPLY_COUPON_TO_CARTDocument mutation ApplyCouponToCart($cartId: String!, $couponCode: String!) {
applyCouponToCart(input: { cart_id: $cartId, coupon_code: $couponCode }) {
cart {
id
applied_coupons {
code
}
prices {
subtotal_excluding_tax { value currency }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
}
}
|
CreateEmptyCart mutation | browser | CREATE_EMPTY_CARTDocument mutation CreateEmptyCart {
createEmptyCart
}
|
applies query | browser | GET_CART_CROSS_SELLSDocument # Fetches cross-sell products via cart ownership rather than the catalog
# products query. The catalog products query applies Magento's visibility
# filter, which would silently exclude products marked "Not Visible
# Individually" (e.g. configurable children). Querying through the cart
# bypasses that filter and also ensures the customer auth token is respected
# so that customer-specific carts are handled correctly.
query GetCartCrossSells($cartId: String!) {
cart(cart_id: $cartId) {
items {
uid
product {
sku
crosssell_products {
...LinkedProductFields
}
}
}
}
}
${LINKED_PRODUCT_FIELDS}
|
GetCartDetails query | browser | GET_CART_DETAILSDocument query GetCartDetails($cartId: String!) {
cart(cart_id: $cartId) {
...CartContentFields
applied_coupons {
code
}
}
}
${CART_CONTENT_FIELDS}
|
GetCartForCheckout query | browser | GET_CART_FOR_CHECKOUTDocument query GetCartForCheckout($cartId: String!) {
cart(cart_id: $cartId) {
...CartContentFields
email
billing_address {
firstname
lastname
street
city
region { code label }
postcode
country { code label }
telephone
}
shipping_addresses {
...CheckoutShippingAddressFields
}
available_payment_methods {
code
title
}
selected_payment_method {
code
title
}
}
}
${CART_CONTENT_FIELDS}
${CHECKOUT_SHIPPING_ADDRESS_FIELDS}
|
GetCrossSellProducts query | browser | GET_CROSS_SELL_PRODUCTSDocument query GetCrossSellProducts($skus: [String]) {
products(filter: { sku: { in: $skus } }) {
items {
crosssell_products {
...LinkedProductFields
}
}
}
}
${LINKED_PRODUCT_FIELDS}
|
GetCustomerCart query | browser | GET_CUSTOMER_CARTDocument query GetCustomerCart {
customerCart {
id
}
}
|
MergeCarts mutation | browser | MERGE_CARTSDocument mutation MergeCarts($sourceCartId: String!, $destinationCartId: String!) {
mergeCarts(source_cart_id: $sourceCartId, destination_cart_id: $destinationCartId) {
id
}
}
|
RemoveCouponFromCart mutation | browser | REMOVE_COUPON_FROM_CARTDocument mutation RemoveCouponFromCart($cartId: String!) {
removeCouponFromCart(input: { cart_id: $cartId }) {
cart {
id
applied_coupons {
code
}
prices {
subtotal_excluding_tax { value currency }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
}
}
|
RemoveItemFromCart mutation | browser | REMOVE_ITEM_FROM_CARTDocument mutation RemoveItemFromCart($cartId: String!, $cartItemUid: ID!) {
removeItemFromCart(input: { cart_id: $cartId, cart_item_uid: $cartItemUid }) {
cart {
id
total_quantity
items {
...CartItemFields
}
prices {
subtotal_excluding_tax { value currency }
subtotal_including_tax { value currency }
applied_taxes { label amount { value currency } }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
}
}
${CART_ITEM_FIELDS}
|
UpdateCartItems mutation | browser | UPDATE_CART_ITEMSDocument mutation UpdateCartItems($cartId: String!, $cartItems: [CartItemUpdateInput!]!) {
updateCartItems(input: { cart_id: $cartId, cart_items: $cartItems }) {
cart {
id
total_quantity
items {
...CartItemFields
}
prices {
subtotal_excluding_tax { value currency }
subtotal_including_tax { value currency }
applied_taxes { label amount { value currency } }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
}
}
${CART_ITEM_FIELDS}
|
catalog
Products, categories, search and the catalog badges the companion modules add.
Needs: Magenx_AutoProductLinks, Magenx_BestSellerGraphQl, Magenx_DealGraphQl, Magenx_GaranGraphQl, Magenx_PriceHistoryGraphQl, Magenx_ProductAttachments, Magenx_QuickSearchGraphQl, Magenx_StripePaymentsGraphQl
| Operation | Runs | Description |
|---|
GetCategoriesByUrlKeys query | browser | GET_CATEGORIES_BY_URL_KEYSDocument query GetCategoriesByUrlKeys($urlKeys: [String!]!) {
categories(filters: { url_key: { in: $urlKeys } }) {
items {
...CategoryFields
}
}
}
${CATEGORY_FIELDS}
|
GetCategoryByUrlKey query | browser | GET_CATEGORY_BY_URL_KEYDocument query GetCategoryByUrlKey($url_key: String!) {
categories(filters: { url_key: { eq: $url_key } }) {
items {
...CategoryFields
breadcrumbs {
category_id
category_name
category_url_key
category_level
}
children {
...CategoryFields
}
}
}
}
${CATEGORY_FIELDS}
|
GetHomepageCategoryProducts query | browser | GET_HOMEPAGE_CATEGORY_PRODUCTSDocument query GetHomepageCategoryProducts(
$filters: ProductAttributeFilterInput!
$pageSize: Int!
$sort: ProductAttributeSortInput
) {
products(filter: $filters, pageSize: $pageSize, sort: $sort) {
items {
...ProductCardFields
}
}
}
${PRODUCT_CARD_FIELDS}
|
GetManufacturerAttributeMetadata query | browser | GET_MANUFACTURER_ATTRIBUTE_METADATADocument query GetManufacturerAttributeMetadata {
customAttributeMetadataV2(
attributes: [{ attribute_code: "manufacturer", entity_type: "catalog_product" }]
) {
items {
options {
label
value
}
}
}
}
|
GetNavigationCategories query | browser | GET_NAVIGATION_CATEGORIESDocument query GetNavigationCategories {
categories(filters: { parent_id: { eq: "2" } }) {
items {
...CategoryFields
children {
...CategoryFields
children {
...CategoryFields
}
}
}
}
}
${CATEGORY_FIELDS}
|
GetProductsByCategory query | browser | GET_PRODUCTS_BY_CATEGORYDocument query GetProductsByCategory(
$pageSize: Int!
$currentPage: Int!
$sort: ProductAttributeSortInput
$filters: ProductAttributeFilterInput
) {
products(
filter: $filters
pageSize: $pageSize
currentPage: $currentPage
sort: $sort
) {
total_count
page_info { current_page page_size total_pages }
items {
...ProductCardFields
}
}
}
${PRODUCT_CARD_FIELDS}
|
GetProductDetail query | browser | GET_PRODUCT_DETAILDocument query GetProductDetail($urlKey: String!) {
products(filter: { url_key: { eq: $urlKey } }) {
items {
...ProductFields
description { html }
meta_title
meta_description
meta_keyword
media_gallery {
url
label
position
disabled
}
categories { id name url_key }
custom_attributesV2(filters: { is_visible_on_front: true }) {
items {
code
... on AttributeValue { value }
... on AttributeSelectedOptions {
selected_options { label value }
}
}
}
... on CustomizableProductInterface {
options {
__typename
uid
title
required
sort_order
... on CustomizableDropDownOption {
values: value { uid title price price_type sort_order }
}
... on CustomizableRadioOption {
values: value { uid title price price_type sort_order }
}
... on CustomizableCheckboxOption {
values: value { uid title price price_type sort_order }
}
... on CustomizableMultipleOption {
values: value { uid title price price_type sort_order }
}
... on CustomizableFieldOption {
entry_value: value { uid price price_type max_characters }
}
... on CustomizableAreaOption {
entry_value: value { uid price price_type max_characters }
}
}
}
... on ConfigurableProduct {
configurable_options {
id
attribute_code
label
values {
value_index
label
swatch_data { value }
}
}
variants {
attributes { code value_index label }
product {
id uid sku name stock_status only_x_left_in_stock
price_range {
minimum_price {
regular_price { value currency }
final_price { value currency }
discount { amount_off percent_off }
}
}
# EU Omnibus prior price for THIS specific variant (child simple
# product). Selecting a swatch swaps the displayed price to the
# child's, so the prior-price disclosure must follow it — the child
# has its own captured history (Magenx_PriceHistoryGraphQl batch
# resolver runs over the variant products too). null when disabled
# or no history captured for the child yet.
price_history {
lowest_price
currency
days
since
}
# EU GARAN label of THIS variant (Magenx_GaranGraphQl). A variant
# without own values inherits the parent's, so the PDP swaps the
# label with the swatch exactly like the price.
garan_label {
...GaranLabelFields
}
image { url label }
}
}
}
}
}
}
${PRODUCT_FIELDS}
|
QuickSearch query | browser | Header autocomplete (desktop-search-panel.tsx / mobile-search.tsx). QUICK_SEARCHDocument query QuickSearch($search: String!, $pageSize: Int!) {
products(search: $search, pageSize: $pageSize, currentPage: 1) {
items {
id
uid
name
url_key
image { url label }
price_range {
minimum_price {
regular_price { value currency }
final_price { value currency }
discount { amount_off percent_off }
}
}
}
}
}
Header autocomplete (desktop-search-panel.tsx / mobile-search.tsx). |
QuickSearchSuggestions query | browser | Dropdown "Top searches" + sponsored items (Magenx_QuickSearchGraphQl), fetched once per dropdown open by the same panels. QUICK_SEARCH_SUGGESTIONSDocument query QuickSearchSuggestions {
quickSearchSuggestions {
popular_terms {
query_text
}
promotions {
id
type
title
image_url
keywords
category_url_path
brand_label
link_url
product {
id
uid
name
url_key
image { url label }
price_range {
minimum_price {
regular_price { value currency }
final_price { value currency }
discount { amount_off percent_off }
}
}
}
}
}
}
Dropdown "Top searches" + sponsored items (Magenx_QuickSearchGraphQl), fetched once per dropdown open by the same panels. |
GetBestSellers query | server only | Best-seller rankings. GET_BEST_SELLERSDocument query GetBestSellers($categoryId: Int, $pageSize: Int) {
bestSellers(category_id: $categoryId, pageSize: $pageSize) {
total_count
items {
rank
product {
...ProductCardFields
}
}
}
}
${PRODUCT_CARD_FIELDS}
Best-seller rankings. The browser reads them from /api/best-sellers (the /best-sellers tabs, the drawers, the 404 / empty-cart rows), which serves catalog.ts's shared 'use cache' entry. Through the proxy — Cache-Control: no-store — every one of those was a live ranking query to Magento per visitor. |
GetDeals query | server only | Deals, store-wide or per DealType. GET_DEALSDocument query GetDeals($type: DealType, $pageSize: Int) {
deals(type: $type, pageSize: $pageSize) {
total_count
items {
product {
...ProductCardFields
}
}
}
}
${PRODUCT_CARD_FIELDS}
Deals, store-wide or per DealType. Same as GET_BEST_SELLERS: the browser (/deals type tabs, the wishlist drawer, the 404 / empty-cart rows) reads catalog.ts's cached entries through /api/deals rather than a no-store proxy query to Magento per visitor. |
GetGiftDeals query | server only | Gift deals live now (Magenx_DealGraphQl): Cart Price Rules without a coupon that add a free product while they apply. GET_GIFT_DEALSDocument query GetGiftDeals {
giftDeals {
rule_id
label
gift_qty
ends_at
product {
...ProductCardFields
}
}
}
${PRODUCT_CARD_FIELDS}
Gift deals live now (Magenx_DealGraphQl): Cart Price Rules without a coupon that add a free product while they apply. Server-only, rendered on /deals by catalog.ts's cached getGiftDeals. Gift deals (free product with a Cart Price Rule), rendered on /deals by catalog.ts's 'use cache' getGiftDeals. Never needed by the browser. |
GetCouponDeals query | server only | Coupon deals (Magenx_DealGraphQl): coupon codes of Cart Price Rules the merchant marked "Show on Storefront", usable now for the store view's guest group. GET_COUPON_DEALSDocument query GetCouponDeals {
couponDeals {
rule_id
code
label
discount_type
discount_value
currency
starts_at
ends_at
unconditional
}
}
Coupon deals (Magenx_DealGraphQl): coupon codes of Cart Price Rules the merchant marked "Show on Storefront", usable now for the store view's guest group. Server-only — read by catalog.ts's cached getCouponDeals for the /deals "Coupons" tab and the product-page coupon strip. Coupon deals (opted-in Cart Price Rule codes), rendered on /deals and the product page by catalog.ts's 'use cache' getCouponDeals. Never needed by the browser. |
GetCategoryAggregations query | server only | Layered-nav facet computation, split off the LCP path and fetched by the category / search server components. GET_CATEGORY_AGGREGATIONSDocument query GetCategoryAggregations($filters: ProductAttributeFilterInput) {
products(filter: $filters, pageSize: 1, currentPage: 1) {
aggregations {
attribute_code
label
count
options { label value count }
}
}
}
Layered-nav facet computation, split off the LCP path and fetched by the category / search server components. |
GetProductsBySkus query | server only | Fetch full catalog product cards for a set of SKUs. GET_PRODUCTS_BY_SKUSDocument query GetProductsBySkus($skus: [String]) {
products(filter: { sku: { in: $skus } }) {
items {
...LinkedProductFields
}
}
}
${LINKED_PRODUCT_FIELDS}
Fetch full catalog product cards for a set of SKUs. Used to turn the lightweight product references on a blog post (sku only) into rich product cards (name/price/image/rating) for the storefront grid. Catalog read issued by catalog.ts on behalf of server components. |
GetSpecialProducts query | server only | Pool for the category page's "special" card, run by catalog.ts's 'use cache' getSpecialProducts from the category server component. GET_SPECIAL_PRODUCTSDocument query GetSpecialProducts($categoryUid: String!, $pageSize: Int!) {
products(
filter: { category_uid: { eq: $categoryUid }, special: { eq: "1" } }
pageSize: $pageSize
) {
items {
...ProductCardFields
short_description { html }
}
}
}
${PRODUCT_CARD_FIELDS}
Pool for the category page's "special" card, run by catalog.ts's 'use cache' getSpecialProducts from the category server component. |
GetProductAttachmentDownload query | server only | Resolves a Magenx_ProductAttachments attachment id to its real, otherwise- hidden location (a pub/media URL for an upload, the merchant-entered URL for an external link). GET_PRODUCT_ATTACHMENT_DOWNLOADDocument query GetProductAttachmentDownload($id: Int!) {
productAttachmentDownload(id: $id) {
type
file_url
filename
mime_type
}
}
Resolves a Magenx_ProductAttachments attachment id to its real, otherwise- hidden location (a pub/media URL for an upload, the merchant-entered URL for an external link).
SERVER-ONLY: called server-to-server by the Next.js /api/download/[id] route (bypassing the /api/graphql proxy — Magento's own GraphQL endpoint is only reachable from this private network, not from the internet). It must NOT be added to the proxy's persisted-query allowlist or run from the browser — see SERVER_ONLY_OPERATIONS in allowed-operations.ts — since that would hand every visitor a way to fetch arbitrary attachment locations directly instead of going through the download route's own streaming/SSRF guard. Resolves a Magenx_ProductAttachments attachment id to its real, otherwise- hidden download location. Called server-to-server only, by /api/download/[id]. MUST never be reachable from the browser: allowlisting it would let any visitor fetch arbitrary attachment locations directly instead of going through the download route's own streaming/SSRF guard. |
GetProductLinkedProducts query | server only | Below-the-fold PDP related / up-sell / frequently-bought-together. GET_PRODUCT_LINKED_PRODUCTSDocument query GetProductLinkedProducts($sku: String!) {
products(filter: { sku: { eq: $sku } }) {
items {
id
related_products { ...LinkedProductFields }
upsell_products { ...LinkedProductFields }
... on ProductInterface {
frequently_bought_together_products { ...LinkedProductFields }
}
}
}
}
${LINKED_PRODUCT_FIELDS}
Below-the-fold PDP related / up-sell / frequently-bought-together. Fetched on scroll, but still server-only: the browser calls /api/product-links, which runs this through catalog.ts's 'use cache' entry. Running it from the browser through the proxy instead would widen the public query surface AND lose that cache — the proxy answers Cache-Control: no-store, so every scrolling visitor would issue a live three-linked-list query to Magento. |
GetProductReviews query | server only | Below-the-fold PDP reviews, streamed from the product page. GET_PRODUCT_REVIEWSDocument query GetProductReviews($sku: String!) {
products(filter: { sku: { eq: $sku } }) {
items {
id
reviews(pageSize: 10, currentPage: 1) {
page_info { current_page page_size total_pages }
items {
nickname
summary
text
created_at
average_rating
ratings_breakdown { name value }
}
}
}
}
}
Below-the-fold PDP reviews, streamed from the product page. |
SearchProducts query | server only | /search results grid, run by catalog.ts's 'use cache' searchProducts. SEARCH_PRODUCTSDocument query SearchProducts(
$search: String!
$pageSize: Int!
$currentPage: Int!
$filter: ProductAttributeFilterInput
$sort: ProductAttributeSortInput
) {
products(
search: $search
filter: $filter
pageSize: $pageSize
currentPage: $currentPage
sort: $sort
) {
total_count
page_info { current_page page_size total_pages }
items {
...ProductCardFields
}
}
}
${PRODUCT_CARD_FIELDS}
/search results grid, run by catalog.ts's 'use cache' searchProducts. The browser's autocomplete uses the lean QUICK_SEARCH instead. |
SearchProductAggregations query | server only | SEARCH_PRODUCT_AGGREGATIONSDocument query SearchProductAggregations($search: String!, $filter: ProductAttributeFilterInput) {
products(search: $search, filter: $filter, pageSize: 1, currentPage: 1) {
aggregations {
attribute_code
label
count
options { label value count }
}
}
}
|
ResolveRoute query | server only | Resolve a Magento request path (foo.html, women/tops.html, an old url key kept as a 301 rewrite) to the entity it points at. RESOLVE_ROUTEDocument query ResolveRoute($url: String!) {
route(url: $url) {
__typename
type
relative_url
redirect_code
... on ProductInterface {
url_key
}
... on CategoryInterface {
url_key
url_path
}
... on CmsPage {
identifier
}
}
}
Resolve a Magento request path (foo.html, women/tops.html, an old url key kept as a 301 rewrite) to the entity it points at. Stock Magento's route query reads url_rewrite, so custom and auto-generated permanent redirects are honoured: redirect_code is 301/302 when the path is a redirect, 0 when it is the entity's current URL.
Used to send legacy Magento URLs to their storefront path — see apps/theme/src/proxy.ts and the product / category pages' not-found branch. Legacy-URL redirects: run by the theme's proxy.ts (a direct fetch to Magento) and by catalog.ts's 'use cache' resolveRoute from the product and category pages' not-found branch. Never needed by the browser. |
GetUrlSuffixes query | server only | The store's product / category URL suffixes (".html" by default). GET_URL_SUFFIXESDocument query GetUrlSuffixes {
storeConfig {
product_url_suffix
category_url_suffix
}
}
The store's product / category URL suffixes (".html" by default). Magento's request paths carry them; the storefront's do not, so a storefront slug has to be suffixed before it can be looked up with RESOLVE_ROUTE. |
checkout
Shipping, billing, payment selection and order placement.
| Operation | Runs | Description |
|---|
PlaceOrder mutation | browser | PLACE_ORDERDocument mutation PlaceOrder($cartId: String!) {
placeOrder(input: { cart_id: $cartId }) {
order {
order_number
}
}
}
|
SetBillingAddressOnCart mutation | browser | SET_BILLING_ADDRESS_ON_CARTDocument mutation SetBillingAddressOnCart($cartId: String!, $address: CartAddressInput!) {
setBillingAddressOnCart(
input: {
cart_id: $cartId
billing_address: { address: $address }
}
) {
cart {
id
}
}
}
|
SetGuestEmailOnCart mutation | browser | SET_GUEST_EMAIL_ON_CARTDocument mutation SetGuestEmailOnCart($cartId: String!, $email: String!) {
setGuestEmailOnCart(input: { cart_id: $cartId, email: $email }) {
cart {
id
email
}
}
}
|
SetPaymentMethodOnCart mutation | browser | SET_PAYMENT_METHOD_ON_CARTDocument mutation SetPaymentMethodOnCart($cartId: String!, $paymentCode: String!) {
setPaymentMethodOnCart(
input: {
cart_id: $cartId
payment_method: { code: $paymentCode }
}
) {
cart {
id
selected_payment_method {
code
title
}
}
}
}
|
SetShippingAddressesOnCart mutation | browser | SET_SHIPPING_ADDRESSES_ON_CARTDocument mutation SetShippingAddressesOnCart($cartId: String!, $address: CartAddressInput!) {
setShippingAddressesOnCart(
input: {
cart_id: $cartId
shipping_addresses: [{ address: $address }]
}
) {
cart {
id
shipping_addresses {
...CheckoutShippingAddressFields
}
# Setting the address re-runs tax and (for a free-shipping rule) the
# shipping estimate, so the totals move here too — without this the
# checkout summary kept the pre-address figures until a method was
# submitted.
prices {
...CartPriceFields
}
}
}
}
${CHECKOUT_SHIPPING_ADDRESS_FIELDS}
${CART_PRICE_FIELDS}
|
SetShippingMethodsOnCart mutation | browser | SET_SHIPPING_METHODS_ON_CARTDocument mutation SetShippingMethodsOnCart(
$cartId: String!
$carrierCode: String!
$methodCode: String!
) {
setShippingMethodsOnCart(
input: {
cart_id: $cartId
shipping_methods: [{ carrier_code: $carrierCode, method_code: $methodCode }]
}
) {
cart {
id
available_payment_methods {
code
title
}
shipping_addresses {
...CheckoutShippingAddressFields
}
prices {
...CartPriceFields
}
}
}
}
${CHECKOUT_SHIPPING_ADDRESS_FIELDS}
${CART_PRICE_FIELDS}
|
checkout-fields
Order comment and delivery date (Magenx_CheckoutFieldsGraphQl).
Needs: Magenx_CheckoutFieldsGraphQl
| Operation | Runs | Description |
|---|
GetCheckoutFields query | browser | The checkout's view of the fields: whether each is offered, the server-computed delivery calendar (null when delivery dates are off, the cart is virtual or In-Store Pickup is selected), and what the cart currently holds. GET_CHECKOUT_FIELDSDocument query GetCheckoutFields($cartId: String!) {
cart(cart_id: $cartId) {
id
checkout_fields {
order_note_enabled
order_note_max_length
order_note
delivery_date
delivery_slot {
...DeliverySlotFields
}
delivery_options {
required
available_dates
slots {
...DeliverySlotFields
}
}
}
}
}
${DELIVERY_SLOT_FIELDS}
The checkout's view of the fields: whether each is offered, the server-computed delivery calendar (null when delivery dates are off, the cart is virtual or In-Store Pickup is selected), and what the cart currently holds. Checkout shipping step: the calendar and the comment box. |
GetOrderCheckoutFields query | browser | The comment and delivery date recorded on one of the customer's orders. GET_ORDER_CHECKOUT_FIELDSDocument query GetOrderCheckoutFields($number: String!) {
customer {
orders(filter: { number: { eq: $number } }) {
items {
id
checkout_fields {
order_note
delivery_date
delivery_slot {
...DeliverySlotFields
}
}
}
}
}
}
${DELIVERY_SLOT_FIELDS}
The comment and delivery date recorded on one of the customer's orders. Account order detail dialog. |
SetCheckoutFieldsOnCart mutation | browser | Store (or clear) the fields on the cart. SET_CHECKOUT_FIELDS_ON_CARTDocument mutation SetCheckoutFieldsOnCart(
$cartId: String!
$orderNote: String
$deliveryDate: String
$deliverySlot: String
) {
setCheckoutFieldsOnCart(
input: {
cart_id: $cartId
order_note: $orderNote
delivery_date: $deliveryDate
delivery_slot: $deliverySlot
}
) {
cart {
id
checkout_fields {
order_note
delivery_date
delivery_slot {
...DeliverySlotFields
}
}
}
}
}
${DELIVERY_SLOT_FIELDS}
Store (or clear) the fields on the cart. Sent once, at the end of the shipping step, so they are on the quote before any payment redirect (PayPal Express leaves the storefront from the payment step and never shows review). |
customer
Customer profile, credentials and address book.
| Operation | Runs | Description |
|---|
ChangeCustomerPassword mutation | browser | Change the signed-in customer's password. CHANGE_CUSTOMER_PASSWORDDocument mutation ChangeCustomerPassword($currentPassword: String!, $newPassword: String!) {
changeCustomerPassword(currentPassword: $currentPassword, newPassword: $newPassword) {
email
}
}
Change the signed-in customer's password. Magento checks currentPassword and counts a wrong one toward the account lockout, so the UI must surface its error message rather than a generic one. |
CreateCustomerAddress mutation | browser | CREATE_CUSTOMER_ADDRESSDocument mutation CreateCustomerAddress(
$firstname: String!
$lastname: String!
$street: [String!]!
$city: String!
$region: CustomerAddressRegionInput
$postcode: String
$country_code: CountryCodeEnum!
$telephone: String
$default_billing: Boolean
$default_shipping: Boolean
) {
createCustomerAddress(
input: {
firstname: $firstname
lastname: $lastname
street: $street
city: $city
region: $region
postcode: $postcode
country_code: $country_code
telephone: $telephone
default_billing: $default_billing
default_shipping: $default_shipping
}
) {
id
firstname
lastname
street
city
region { region_code region }
postcode
country_code
telephone
default_billing
default_shipping
}
}
|
DeleteCustomerAddress mutation | browser | DELETE_CUSTOMER_ADDRESSDocument mutation DeleteCustomerAddress($id: Int!) {
deleteCustomerAddress(id: $id)
}
|
GetCustomer query | browser | GET_CUSTOMERDocument query GetCustomer {
customer {
firstname
lastname
email
date_of_birth
gender
is_subscribed
taxvat
addresses {
id
firstname
lastname
street
city
region {
region_code
region
}
postcode
country_code
telephone
default_billing
default_shipping
}
}
}
|
UpdateCustomer mutation | browser | UPDATE_CUSTOMERDocument mutation UpdateCustomer(
$firstname: String
$lastname: String
$is_subscribed: Boolean
$taxvat: String
) {
updateCustomer(
input: {
firstname: $firstname
lastname: $lastname
is_subscribed: $is_subscribed
taxvat: $taxvat
}
) {
customer {
firstname
lastname
email
is_subscribed
taxvat
}
}
}
|
UpdateCustomerAddress mutation | browser | UPDATE_CUSTOMER_ADDRESSDocument mutation UpdateCustomerAddress(
$id: Int!
$firstname: String
$lastname: String
$street: [String!]
$city: String
$region: CustomerAddressRegionInput
$postcode: String
$country_code: CountryCodeEnum
$telephone: String
$default_billing: Boolean
$default_shipping: Boolean
) {
updateCustomerAddress(
id: $id
input: {
firstname: $firstname
lastname: $lastname
street: $street
city: $city
region: $region
postcode: $postcode
country_code: $country_code
telephone: $telephone
default_billing: $default_billing
default_shipping: $default_shipping
}
) {
id
firstname
lastname
street
city
region { region_code region }
postcode
country_code
telephone
default_billing
default_shipping
}
}
|
UpdateCustomerEmail mutation | browser | Change the signed-in customer's email. UPDATE_CUSTOMER_EMAILDocument mutation UpdateCustomerEmail($email: String!, $password: String!) {
updateCustomerEmail(email: $email, password: $password) {
customer {
email
}
}
}
Change the signed-in customer's email. Magento requires the current password and emails a change notice to the previous address. |
downloads
Purchased downloadable products.
| Operation | Runs | Description |
|---|
GetCustomerDownloadableProducts query | browser | The signed-in customer's purchased download links. GET_CUSTOMER_DOWNLOADABLE_PRODUCTSDocument query GetCustomerDownloadableProducts {
customerDownloadableProducts {
items {
date
status
remaining_downloads
order_increment_id
download_url
}
}
}
The signed-in customer's purchased download links. Magento returns only the token holder's own links, which is what makes this the ownership check for the storefront's /api/downloads/[hash] route as well as the list behind the account Downloads tab.
download_url is Magento's downloadable/download/link/id/<link_hash>/ route built on the store base URL; the storefront only reads the hash from it and never sends a browser there (see the route for why).
The stock CustomerDownloadableProduct type has no product or link name, so none is selected: asking for one fails the whole document. Account Downloads tab. Also run server-side, with the customer's token, by /api/downloads/[hash] as its ownership check. |
free-shipping
Free-shipping threshold status (Magenx_FreeShippingGraphQl).
Needs: Magenx_FreeShippingGraphQl
| Operation | Runs | Description |
|---|
GetFreeShipping query | browser | The threshold from the Free Shipping carrier settings and, for a cart, the amount still to go and whether it qualifies — computed by the server with the carrier's own rule, in the cart's (or display) currency. GET_FREE_SHIPPINGDocument query GetFreeShipping($cartId: String) {
freeShipping(cart_id: $cartId) {
threshold {
value
currency
}
remaining {
value
currency
}
qualifies
}
}
The threshold from the Free Shipping carrier settings and, for a cart, the amount still to go and whether it qualifies — computed by the server with the carrier's own rule, in the cart's (or display) currency. freeShipping is null when the carrier is off, the cart is virtual or its destination is not served; remaining is null without a cart. PDP shipping panel and cart page progress indicator; re-read after every cart change, so it runs in the browser. |
garan
EU legal guarantee notice (Magenx_GaranGraphQl).
Needs: Magenx_GaranGraphQl
| Operation | Runs | Description |
|---|
GetGaranNotice query | server only | Static per store view, so the layout fetches it once through the cached server helper getGaranNotice (magento/store.ts) and hands it to the client via GaranNoticeProvider. GET_GARAN_NOTICEDocument query GetGaranNotice {
garanNotice {
language
svg_url
link_url
link_label
alt_text
}
}
Static per store view, so the layout fetches it once through the cached server helper getGaranNotice (magento/store.ts) and hands it to the client via GaranNoticeProvider. No browser ever needs to run it. |
gdpr
Cookie consent and data-subject requests.
Needs: Magenx_GdprGraphQl
| Operation | Runs | Description |
|---|
MyGdprRequests query | browser | Client-run from the cookie consent banner and the account "Privacy" tab. MY_GDPR_REQUESTSDocument query MyGdprRequests {
myGdprRequests {
id
type
status
admin_note
requested_at
resolved_at
}
}
Client-run from the cookie consent banner and the account "Privacy" tab. GET_GDPR_COOKIE_GROUPS is deliberately absent — see below. |
MyPersonalDataExport query | browser | MY_PERSONAL_DATA_EXPORTDocument query MyPersonalDataExport {
myPersonalDataExport {
generated_at
profile {
firstname
lastname
email
date_of_birth
}
addresses {
firstname
lastname
street
city
region
postcode
country_code
telephone
}
orders {
increment_id
created_at
status
grand_total
}
consent_history {
context
necessary
analytics
marketing
preferences
created_at
}
}
}
|
RequestGdprAction mutation | browser | REQUEST_GDPR_ACTIONDocument mutation RequestGdprAction($type: GdprRequestTypeEnum!, $note: String) {
requestGdprAction(input: { type: $type, note: $note }) {
id
type
status
admin_note
requested_at
resolved_at
}
}
|
SubmitCookieConsent mutation | browser | SUBMIT_COOKIE_CONSENTDocument mutation SubmitCookieConsent($analytics: Boolean!, $marketing: Boolean!, $preferences: Boolean!) {
submitCookieConsent(
input: { analytics: $analytics, marketing: $marketing, preferences: $preferences }
)
}
|
GetGdprCookieGroups query | server only | Public, store-wide cookie registry for the /cookies policy page. GET_GDPR_COOKIE_GROUPSDocument query GetGdprCookieGroups {
gdprCookieGroups {
code
label
description
is_required
cookies {
name
purpose
duration_label
source
}
}
}
Public, store-wide cookie registry for the /cookies policy page. Fetched server-side (getGdprCookieGroups) and cached like store config; nothing in the browser calls it directly. |
helpdesk
Support tickets.
Needs: Magenx_HelpdeskGraphQl
| Operation | Runs | Description |
|---|
AddHelpdeskTicketMessage mutation | browser | Client-run from the account "Support" tab. ADD_HELPDESK_TICKET_MESSAGEDocument mutation AddHelpdeskTicketMessage($input: AddHelpdeskTicketMessageInput!) {
addHelpdeskTicketMessage(input: $input) {
ticket {
...HelpdeskTicketFields
}
}
}
${HELPDESK_TICKET_FIELDS}
Client-run from the account "Support" tab. Magenx_HelpdeskGraphQl must be deployed BEFORE a build carrying these, or every one of them fails schema validation. |
CloseHelpdeskTicket mutation | browser | CLOSE_HELPDESK_TICKETDocument mutation CloseHelpdeskTicket($code: String!) {
closeHelpdeskTicket(code: $code) {
...HelpdeskTicketFields
}
}
${HELPDESK_TICKET_FIELDS}
|
CreateHelpdeskGuestTicket mutation | browser | Contact page, logged out. CREATE_HELPDESK_GUEST_TICKETDocument mutation CreateHelpdeskGuestTicket($input: CreateHelpdeskGuestTicketInput!) {
createHelpdeskGuestTicket(input: $input) {
code
}
}
Contact page, logged out. Turnstile-protected and guest-only at the proxy. |
CreateHelpdeskTicket mutation | browser | CREATE_HELPDESK_TICKETDocument mutation CreateHelpdeskTicket($input: CreateHelpdeskTicketInput!) {
createHelpdeskTicket(input: $input) {
ticket {
...HelpdeskTicketFields
}
}
}
${HELPDESK_TICKET_FIELDS}
|
GetHelpdeskMetadata query | browser | GET_HELPDESK_METADATADocument query GetHelpdeskMetadata {
helpdeskMetadata {
enabled
customer_account_enabled
guest_enabled
allow_priority
allow_department
allow_order
departments {
id
title
}
priorities {
...HelpdeskLookupValueFields
}
custom_fields {
code
title
type
description
is_required
options {
value
label
}
}
}
}
${HELPDESK_LOOKUP_VALUE_FIELDS}
|
GetHelpdeskTicket query | browser | GET_HELPDESK_TICKETDocument query GetHelpdeskTicket($code: String!) {
helpdeskTicket(code: $code) {
...HelpdeskTicketFields
}
}
${HELPDESK_TICKET_FIELDS}
|
GetHelpdeskTickets query | browser | GET_HELPDESK_TICKETSDocument query GetHelpdeskTickets(
$currentPage: Int!
$pageSize: Int!
$sort: HelpdeskTicketsSortInput
) {
helpdeskTickets(currentPage: $currentPage, pageSize: $pageSize, sort: $sort) {
total_count
page_info {
current_page
page_size
total_pages
}
items {
code
subject
status {
...HelpdeskLookupValueFields
}
priority {
...HelpdeskLookupValueFields
}
is_locked
last_reply_by
created_at
updated_at
}
}
}
${HELPDESK_LOOKUP_VALUE_FIELDS}
|
marketing
Contact form, newsletter and email-to-a-friend.
| Operation | Runs | Description |
|---|
ContactUs mutation | browser | CONTACT_USDocument mutation ContactUs($input: ContactUsInput!) {
contactUs(input: $input) {
status
}
}
|
SendEmailToFriend mutation | browser | SEND_EMAIL_TO_FRIENDDocument mutation SendEmailToFriend($input: SendEmailToFriendInput!) {
sendEmailToFriend(input: $input) {
sender {
name
email
message
}
recipients {
name
email
}
}
}
|
SubscribeEmailToNewsletter mutation | browser | SUBSCRIBE_EMAIL_TO_NEWSLETTERDocument mutation SubscribeEmailToNewsletter($email: String!) {
subscribeEmailToNewsletter(email: $email) {
status
}
}
|
mollie
Mollie Payments for Magento 2 (hosted payment page).
Needs: Mollie_Payment
| Operation | Runs | Description |
|---|
GetMolliePaymentMethodMeta query | browser | Issuers per Mollie method on this cart (KBC/CBC and other issuer-based methods). GET_MOLLIE_PAYMENT_METHOD_METADocument query GetMolliePaymentMethodMeta($cartId: String!) {
cart(cart_id: $cartId) {
id
available_payment_methods {
code
mollie_available_issuers {
code
name
}
}
}
}
Issuers per Mollie method on this cart (KBC/CBC and other issuer-based methods). Methods without issuers return an empty list. Run once when the payment step opens. Method icons are not read from mollie_meta.image: it is a Magento /static URL, and nginx does not expose Magento's /static. Payment step: issuers per Mollie method, and the profile ID the in-page card form (Mollie Components) is initialised with. |
GetMollieComponentsConfig query | browser | The profile ID and mode Mollie Components (the in-page card form) is initialised with. GET_MOLLIE_COMPONENTS_CONFIGDocument query GetMollieComponentsConfig {
storeConfig {
mollie {
profile_id
live_mode
}
}
}
The profile ID and mode Mollie Components (the in-page card form) is initialised with. Not secret: a profile ID is not an API key. Its own document, not part of GET_STORE_CONFIG, so StoreConfig.mollie never becomes a dependency of every page. A null profile_id means Components cannot run and card entry falls back to Mollie's hosted page. |
SetMolliePaymentMethodOnCart mutation | browser | Sets a Mollie method on the cart, with the issuer the shopper picked when the method has issuers. SET_MOLLIE_PAYMENT_METHOD_ON_CARTDocument mutation SetMolliePaymentMethodOnCart(
$cartId: String!
$paymentCode: String!
$issuer: String
$cardToken: String
) {
setPaymentMethodOnCart(
input: {
cart_id: $cartId
payment_method: {
code: $paymentCode
mollie_selected_issuer: $issuer
mollie_card_token: $cardToken
}
}
) {
cart {
id
selected_payment_method {
code
title
}
}
}
}
Sets a Mollie method on the cart, with the issuer the shopper picked when the method has issuers. $issuer may be null: Mollie's hosted page then asks for it itself. $cardToken is the Mollie Components token for an in-page card payment (mollie_methods_creditcard); null sends the shopper to Mollie's hosted card page instead. Payment step submit / review-step Place Order. |
PlaceOrderMollie mutation | browser | Places the order and returns the Mollie hosted-checkout URL plus the payment token /order/mollie-return settles it with. PLACE_ORDER_MOLLIEDocument mutation PlaceOrderMollie($cartId: String!, $returnUrl: String!) {
placeOrder(input: { cart_id: $cartId, mollie_return_url: $returnUrl }) {
order {
order_number
mollie_redirect_url
mollie_payment_token
}
}
}
Places the order and returns the Mollie hosted-checkout URL plus the payment token /order/mollie-return settles it with. $returnUrl must carry the locale prefix — it is a full-page navigation from Mollie.
Selecting mollie_redirect_url is what starts the Mollie transaction. It is null when the payment needs no page at all — a Components card payment that was paid without 3-D Secure. |
MollieProcessTransaction mutation | browser | Syncs the Mollie payment status into Magento when the shopper comes back. MOLLIE_PROCESS_TRANSACTIONDocument mutation MollieProcessTransaction($paymentToken: String!) {
mollieProcessTransaction(input: { payment_token: $paymentToken }) {
paymentStatus
redirect_to_success_page
redirect_to_cart
awaiting_confirmation
cart {
id
}
}
}
Syncs the Mollie payment status into Magento when the shopper comes back. Route on the booleans, never on paymentStatus — the booleans already account for methods (bank transfer) where OPEN is a success. On failure Mollie reactivates the cart and returns it in cart. /order/mollie-return. The payment token and the order hash both come from Mollie's return URL; neither resolves anything without them. |
GetMollieOrderStatus query | browser | The Magento order status behind the encrypted order_id hash Mollie appends to the return URL. GET_MOLLIE_ORDER_STATUSDocument query GetMollieOrderStatus($hash: String!) {
mollieCustomerOrder(hash: $hash) {
number
status
}
}
The Magento order status behind the encrypted order_id hash Mollie appends to the return URL. Polled briefly while awaiting_confirmation is true: the webhook may confirm the payment moments after the shopper returns. Selects the status only — the hash is a bearer credential for the whole order. |
orders
Order history, invoices, shipments and guest order lookup.
Needs: Magenx_GaranGraphQl, Magenx_StorePickupGraphQl
| Operation | Runs | Description |
|---|
CancelOrder mutation | browser | CANCEL_ORDERDocument mutation CancelOrder($orderId: ID!, $reason: String!) {
cancelOrder(input: { order_id: $orderId, reason: $reason }) {
errorV2 {
code
message
}
order {
id
number
status
}
}
}
|
GetCustomerInvoices query | browser | GET_CUSTOMER_INVOICESDocument query GetCustomerInvoices(
$currentPage: Int!
$pageSize: Int!
$sort: CustomerOrderSortInput
) {
customer {
orders(currentPage: $currentPage, pageSize: $pageSize, sort: $sort) {
page_info {
current_page
page_size
total_pages
}
items {
number
order_date
status
invoices {
id
number
total {
grand_total { value currency }
subtotal { value currency }
}
items {
product_name
product_sku
quantity_invoiced
product_sale_price { value currency }
}
}
}
}
}
}
|
GetCustomerOrders query | browser | GET_CUSTOMER_ORDERSDocument query GetCustomerOrders(
$currentPage: Int!
$pageSize: Int!
$sort: CustomerOrderSortInput
) {
customer {
orders(currentPage: $currentPage, pageSize: $pageSize, sort: $sort) {
page_info {
current_page
page_size
total_pages
}
items {
id
number
order_date
status
total {
grand_total {
value
currency
}
}
items {
product_name
product_sku
quantity_ordered
product_sale_price {
value
currency
}
}
invoices { id number }
shipments { id number }
}
}
}
}
|
GetCustomerShipments query | browser | GET_CUSTOMER_SHIPMENTSDocument query GetCustomerShipments(
$currentPage: Int!
$pageSize: Int!
$sort: CustomerOrderSortInput
) {
customer {
orders(currentPage: $currentPage, pageSize: $pageSize, sort: $sort) {
page_info {
current_page
page_size
total_pages
}
items {
number
order_date
status
shipments {
id
number
tracking { title number carrier }
items { product_name quantity_shipped }
}
}
}
}
}
|
GetOrderDetail query | browser | GET_ORDER_DETAILDocument query GetOrderDetail($number: String!) {
customer {
orders(filter: { number: { eq: $number } }) {
items {
...OrderDetailFields
}
}
}
}
${ORDER_DETAIL_FIELDS}
|
GuestOrderLookup query | browser | GUEST_ORDER_LOOKUPDocument query GuestOrderLookup($number: String!, $email: String!, $lastname: String!) {
guestOrder(input: { number: $number, email: $email, lastname: $lastname }) {
...OrderDetailFields
}
}
${ORDER_DETAIL_FIELDS}
|
ReorderItems mutation | browser | REORDER_ITEMSDocument mutation ReorderItems($orderNumber: String!) {
reorderItems(orderNumber: $orderNumber) {
cart {
id
total_quantity
}
userInputErrors {
code
message
}
}
}
|
payments
Stripe and PayPal Express, including Stripe subscriptions.
Needs: Magenx_StripePaymentsGraphQl
| Operation | Runs | Description |
|---|
CancelStripeSubscription mutation | browser | Cancels one of the logged-in customer's Stripe subscriptions and returns the refreshed list. CANCEL_STRIPE_SUBSCRIPTIONDocument mutation CancelStripeSubscription($subscriptionId: String!) {
cancelStripeSubscription(subscription_id: $subscriptionId) {
success
message
subscriptions {
...StripeSubscriptionFields
}
}
}
${STRIPE_SUBSCRIPTION_FIELDS}
Cancels one of the logged-in customer's Stripe subscriptions and returns the refreshed list. Magento validates ownership server-side; the storefront only offers the button when can_cancel is true. Client-run → allowlisted. Client-run from the account "Subscriptions" tab (Magenx_StripePaymentsGraphQl). |
CreatePaypalExpressToken mutation | browser | Creates a PayPal Express token and returns the PayPal redirect URLs. CREATE_PAYPAL_EXPRESS_TOKENDocument mutation CreatePaypalExpressToken(
$cartId: String!
$returnUrl: String!
$cancelUrl: String!
) {
createPaypalExpressToken(
input: {
cart_id: $cartId
code: "paypal_express"
urls: { return_url: $returnUrl cancel_url: $cancelUrl }
express_button: false
}
) {
token
paypal_urls {
start
}
}
}
Creates a PayPal Express token and returns the PayPal redirect URLs. Redirect the shopper to paypal_urls.start; after they approve the payment PayPal sends them back to return_url with token and PayerID query params. |
GetCustomerStripeSubscriptions query | browser | Lists the logged-in customer's Stripe subscriptions (active + recently canceled). GET_CUSTOMER_STRIPE_SUBSCRIPTIONSDocument query GetCustomerStripeSubscriptions {
customer {
stripe_subscriptions {
...StripeSubscriptionFields
}
}
}
${STRIPE_SUBSCRIPTION_FIELDS}
Lists the logged-in customer's Stripe subscriptions (active + recently canceled). Backed by the customer's Stripe customer record, so it requires a customer auth token. Client-run → must stay in the /api/graphql allowlist. |
GetStripeConfiguration query | browser | Retrieves the Stripe publishable API key and Elements configuration from the Magento Stripe module (configured in Magento admin). GET_STRIPE_CONFIGURATIONDocument query GetStripeConfiguration {
getStripeConfiguration {
apiKey
locale
}
}
Retrieves the Stripe publishable API key and Elements configuration from the Magento Stripe module (configured in Magento admin). |
PlaceOrderStripe mutation | browser | Places the order via Stripe and returns the PaymentIntent client_secret so the storefront can finish authentication client-side (3DS modal for cards, full-page redirect to the bank for iDEAL/EPS/Bancontact/etc.). PLACE_ORDER_STRIPEDocument mutation PlaceOrderStripe($cartId: String!) {
placeOrder(input: { cart_id: $cartId }) {
order {
order_number
client_secret
}
}
}
Places the order via Stripe and returns the PaymentIntent client_secret so the storefront can finish authentication client-side (3DS modal for cards, full-page redirect to the bank for iDEAL/EPS/Bancontact/etc.).
Field name assumption: most Magento Stripe modules expose the PaymentIntent client_secret as client_secret on the order. If your module uses a different name, rename it here (and in PlaceOrderStripeOutput). |
SetPaypalExpressPaymentMethodOnCart mutation | browser | Sets PayPal Express as the payment method on the cart after the shopper returns from the PayPal approval page. SET_PAYPAL_EXPRESS_PAYMENT_METHOD_ON_CARTDocument mutation SetPaypalExpressPaymentMethodOnCart(
$cartId: String!
$payerId: String!
$token: String!
) {
setPaymentMethodOnCart(
input: {
cart_id: $cartId
payment_method: {
code: "paypal_express"
paypal_express: { payer_id: $payerId token: $token }
}
}
) {
cart {
id
selected_payment_method {
code
title
}
}
}
}
Sets PayPal Express as the payment method on the cart after the shopper returns from the PayPal approval page. payer_id and token are extracted from the return URL query params. |
SetStripePaymentMethodOnCart mutation | browser | Sets the Stripe payment method on the cart using a Stripe payment method ID obtained by calling stripe.createPaymentMethod({ elements }) in the browser. SET_STRIPE_PAYMENT_METHOD_ON_CARTDocument mutation SetStripePaymentMethodOnCart($cartId: String!, $paymentMethodId: String!) {
setPaymentMethodOnCart(
input: {
cart_id: $cartId
payment_method: {
code: "stripe_payments"
stripe_payments: { payment_method: $paymentMethodId }
}
}
) {
cart {
id
selected_payment_method {
code
title
}
}
}
}
Sets the Stripe payment method on the cart using a Stripe payment method ID obtained by calling stripe.createPaymentMethod({ elements }) in the browser. The Magento Stripe module creates the PaymentIntent internally on placeOrder. |
product-alerts
Back-in-stock and price-drop alerts.
Needs: Magenx_ProductAlertGraphQl
| Operation | Runs | Description |
|---|
GetCustomerProductAlerts query | browser | GET_CUSTOMER_PRODUCT_ALERTSDocument query GetCustomerProductAlerts {
customer {
product_alerts {
price_alerts {
id
alert_type
price
current_price
price_diff
add_date
status
status_changed_at
product {
...ProductAlertProductFields
}
}
stock_alerts {
id
alert_type
add_date
status
status_changed_at
product {
...ProductAlertProductFields
}
}
}
}
}
${PRODUCT_ALERT_PRODUCT_FIELDS}
|
GetProductAlertStatus query | browser | GET_PRODUCT_ALERT_STATUSDocument query GetProductAlertStatus($sku: String!) {
productAlertStatus(product_sku: $sku) {
product_sku
is_price_alert_subscribed
is_stock_alert_subscribed
}
}
|
SubscribeProductAlert mutation | browser | SUBSCRIBE_PRODUCT_ALERTDocument mutation SubscribeProductAlert($sku: String!, $alertType: ProductAlertType!) {
productAlertSubscribe(input: { product_sku: $sku, alert_type: $alertType }) {
product_sku
alert_type
is_subscribed
}
}
|
UnsubscribeProductAlert mutation | browser | UNSUBSCRIBE_PRODUCT_ALERTDocument mutation UnsubscribeProductAlert($sku: String!, $alertType: ProductAlertType!) {
productAlertUnsubscribe(input: { product_sku: $sku, alert_type: $alertType }) {
product_sku
alert_type
is_subscribed
}
}
|
returns
RMA: customer and guest returns.
Needs: Magenx_RmaGraphQl
| Operation | Runs | Description |
|---|
CreateCustomerReturn mutation | browser | CREATE_CUSTOMER_RETURNDocument mutation CreateCustomerReturn($input: CreateReturnInput!) {
createCustomerReturn(input: $input) {
return {
...CustomerReturnFields
}
}
}
${CUSTOMER_RETURN_FIELDS}
|
CreateGuestReturn mutation | browser | CREATE_GUEST_RETURNDocument mutation CreateGuestReturn($input: CreateGuestReturnInput!) {
createGuestReturn(input: $input) {
return {
...CustomerReturnFields
}
}
}
${CUSTOMER_RETURN_FIELDS}
|
GetCustomerReturn query | browser | GET_CUSTOMER_RETURNDocument query GetCustomerReturn($rmaId: Int!) {
customerReturn(rma_id: $rmaId) {
...CustomerReturnFields
}
}
${CUSTOMER_RETURN_FIELDS}
|
GetCustomerReturns query | browser | GET_CUSTOMER_RETURNSDocument query GetCustomerReturns(
$currentPage: Int!
$pageSize: Int!
$sort: CustomerReturnsSortInput
) {
customerReturns(currentPage: $currentPage, pageSize: $pageSize, sort: $sort) {
total_count
page_info {
current_page
page_size
total_pages
}
items {
rma_id
increment_id
order_number
status {
...ReturnLookupValueFields
}
created_at
updated_at
}
}
}
${RETURN_LOOKUP_VALUE_FIELDS}
|
GetGuestReturn query | browser | GET_GUEST_RETURNDocument query GetGuestReturn($orderNumber: String!, $email: String!, $rmaId: Int!) {
guestReturn(order_number: $orderNumber, email: $email, rma_id: $rmaId) {
...CustomerReturnFields
}
}
${CUSTOMER_RETURN_FIELDS}
|
GetReturnAttributesMetadata query | browser | GET_RETURN_ATTRIBUTES_METADATADocument query GetReturnAttributesMetadata {
returnAttributesMetadata {
reasons {
...ReturnLookupValueFields
}
resolution_types {
...ReturnLookupValueFields
}
conditions {
...ReturnLookupValueFields
}
}
}
${RETURN_LOOKUP_VALUE_FIELDS}
|
SubmitWithdrawal mutation | browser | The /withdrawal form. SUBMIT_WITHDRAWALDocument mutation SubmitWithdrawal($input: SubmitWithdrawalInput!) {
submitWithdrawal(input: $input) {
ticket_code
received_at
}
}
The /withdrawal form. Turnstile-protected (action withdrawal); the customer token is forwarded so a logged-in owner needs no email match. |
reviews
Product reviews.
| Operation | Runs | Description |
|---|
CreateProductReview mutation | browser | CREATE_PRODUCT_REVIEWDocument mutation CreateProductReview($input: CreateProductReviewInput!) {
createProductReview(input: $input) {
review {
nickname
summary
text
average_rating
created_at
}
}
}
|
GetCustomerReviews query | browser | GET_CUSTOMER_REVIEWSDocument query GetCustomerReviews($pageSize: Int!, $currentPage: Int!) {
customer {
reviews(pageSize: $pageSize, currentPage: $currentPage) {
items {
summary
text
nickname
average_rating
created_at
ratings_breakdown {
name
value
}
product {
name
url_key
sku
small_image {
url
}
}
}
page_info {
current_page
page_size
total_pages
}
}
}
}
|
GetProductReviewRatingsMetadata query | browser | GET_PRODUCT_REVIEW_RATINGS_METADATADocument query GetProductReviewRatingsMetadata {
productReviewRatingsMetadata {
items {
id
name
values {
value_id
value
}
}
}
}
|
rewards
Reward points: balance, applying them to a cart, the points discount on.
Needs: Magenx_RewardGraphQl
| Operation | Runs | Description |
|---|
ApplyRewardPointsToCart mutation | browser | APPLY_REWARD_POINTS_TO_CARTDocument mutation ApplyRewardPointsToCart($cartId: String!, $points: Int!) {
applyRewardPointsToCart(input: { cart_id: $cartId, points: $points }) {
cart {
id
reward_points {
...CartRewardPointsFields
}
prices {
subtotal_excluding_tax { value currency }
subtotal_including_tax { value currency }
applied_taxes { label amount { value currency } }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
}
}
${CART_REWARD_POINTS_FIELDS}
|
ApplyRewardReferralCode mutation | browser | APPLY_REWARD_REFERRAL_CODEDocument mutation ApplyRewardReferralCode($code: String!) {
applyRewardReferralCode(input: { code: $code }) {
coupon_code
}
}
|
GetCartRewardPoints query | browser | GET_CART_REWARD_POINTSDocument query GetCartRewardPoints($cartId: String!) {
cart(cart_id: $cartId) {
id
reward_points {
...CartRewardPointsFields
}
}
customer {
reward_points {
balance
balance_value { value currency }
}
}
}
${CART_REWARD_POINTS_FIELDS}
|
GetCustomerRewardPoints query | browser | GET_CUSTOMER_REWARD_POINTSDocument query GetCustomerRewardPoints($pageSize: Int = 20, $currentPage: Int = 1) {
customer {
reward_points {
balance
pending
lifetime_earned
balance_value { value currency }
next_expiry { date points }
history(pageSize: $pageSize, currentPage: $currentPage) {
items {
id
type
points
balance_after
pending_after
reason
expires_at
created_at
order_number
}
total_count
page_info {
page_size
current_page
total_pages
}
}
}
}
}
|
GetCustomerRewardReferral query | browser | GET_CUSTOMER_REWARD_REFERRALDocument query GetCustomerRewardReferral {
customer {
reward_points {
referral {
code
bonus_points
invited_count
rewarded_count
points_earned
received_coupon
can_apply_code
}
}
}
}
|
GetOrderRewardPoints query | browser | GET_ORDER_REWARD_POINTSDocument query GetOrderRewardPoints($number: String!) {
customer {
orders(filter: { number: { eq: $number } }) {
items {
id
reward_points {
...SalesRewardPointsFields
}
}
}
}
}
${SALES_REWARD_POINTS_FIELDS}
|
RemoveRewardPointsFromCart mutation | browser | REMOVE_REWARD_POINTS_FROM_CARTDocument mutation RemoveRewardPointsFromCart($cartId: String!) {
removeRewardPointsFromCart(input: { cart_id: $cartId }) {
cart {
id
reward_points {
...CartRewardPointsFields
}
prices {
subtotal_excluding_tax { value currency }
subtotal_including_tax { value currency }
applied_taxes { label amount { value currency } }
discounts { label amount { value currency } }
grand_total { value currency }
}
}
}
}
${CART_REWARD_POINTS_FIELDS}
|
store
Store config, store views, countries, CMS blocks and pickup locations.
Needs: Magenx_StorePickupGraphQl
| Operation | Runs | Description |
|---|
GetAvailableStores query | browser | Discovery query — every store view configured in Magento. GET_AVAILABLE_STORESDocument query GetAvailableStores {
availableStores(useCurrentGroup: false) {
store_code
locale
store_name
is_default_store
is_default_store_group
default_display_currency_code
}
}
Discovery query — every store view configured in Magento. Run at BUILD time by the theme's scripts/sync-stores.mts, whose answer becomes the storefront's locale → store-view table (src/generated/stores.json), and at boot by the drift check (apps/theme/src/lib/store-drift.ts). Nothing runs it per request.
Client-allowlisted although no browser code issues it: the build reaches Magento through the deployed storefront's allowlist-enforced /api/graphql. The theme sends a string copy of this document (AVAILABLE_STORES_QUERY in apps/theme/src/lib/store-mapping.ts) and a test pins the two to the same printed form — change both together. |
GetCountries query | browser | Fetch all enabled countries for the storefront. GET_COUNTRIESDocument query GetCountries {
countries {
id
two_letter_abbreviation
three_letter_abbreviation
full_name_english
full_name_locale
available_regions {
id
code
name
}
}
}
Fetch all enabled countries for the storefront. Used by checkout to populate the country dropdown dynamically instead of hardcoding a subset. The list reflects the merchant's "Allow Countries" config. |
GetStoreConfig query | browser | GET_STORE_CONFIGDocument query GetStoreConfig {
storeConfig {
store_code
store_name
base_currency_code
default_display_currency_code
locale
copyright
logo_alt
secure_base_media_url
product_alert_allow_price
product_alert_allow_stock
reward_points_enabled
reward_points_earn_rate
reward_points_redeem_rate
reward_points_min_per_order
reward_points_max_per_order
reward_points_hold_days
reward_points_expiry_days
order_cancellation_enabled
order_cancellation_reasons {
description
}
allow_order
allow_items
best_seller_enabled
best_seller_badge_enabled
best_seller_badge_max_rank
store_pickup_enabled
store_pickup_title
# Deals feature flag (Magenx_DealGraphQl). Rides this already-allowlisted
# query — the hash shifts consistently on both the proxy and the client.
deals_enabled
# EU Omnibus prior-price feature flag (Magenx_PriceHistoryGraphQl). Rides
# this already-allowlisted query too. Gating is primarily field-presence
# (price_history resolves null when disabled); this flag is exposed for
# parity / optional menu-style gating.
price_history_enabled
# Customer account policy (core Magento_CustomerGraphQl). The password
# rules drive the client-side checks on register / reset / change
# password; the confirmation flag switches registration to "check your
# inbox" instead of "account created".
minimum_password_length
required_character_classes_number
create_account_confirmation
}
}
|
GetStorePickupLocations query | browser | GET_STORE_PICKUP_LOCATIONSDocument query GetStorePickupLocations {
storePickupLocations {
code
name
street
city
region
postcode
country_id
phone
hours
latitude
longitude
}
}
|
SetStorePickupLocationOnCart mutation | browser | SET_STORE_PICKUP_LOCATION_ON_CARTDocument mutation SetStorePickupLocationOnCart($cartId: String!, $locationCode: String) {
setStorePickupLocationOnCart(
input: { cart_id: $cartId, location_code: $locationCode }
) {
cart {
id
store_pickup_location {
code
name
}
}
}
}
|
GetCmsBlocks query | server only | CMS block content for the announcement bar, header info bar, newsletter panel, homepage/category promos and CMS pages. GET_CMS_BLOCKSDocument query GetCmsBlocks($identifiers: [String!]!) {
cmsBlocks(identifiers: $identifiers) {
items {
identifier
title
content
}
}
}
CMS block content for the announcement bar, header info bar, newsletter panel, homepage/category promos and CMS pages. Every caller goes through catalog.ts's getCmsBlocks, a server-only 'use cache' helper that runs sanitizeCmsHtml over content at the fetch boundary. Server-only is load-bearing, not just tidiness: the components that render this content — cms-blocks.tsx, announcement-bar.tsx, header-shell.tsx, newsletter-subscription.tsx — pass it to dangerouslySetInnerHTML WITHOUT re-sanitizing, deliberately, so the heavy sanitize-html/htmlparser2 parser stays out of the client bundle. Leaving the operation client-runnable let a browser fetch the raw, unsanitized HTML straight from Magento and would have made the very first client-side useQuery against it an XSS sink. |
ucp
Agentic-commerce documents (UCP / ACP). Persisted-query classification for.
| Operation | Runs | Description |
|---|
UcpCatalogProducts query | server only | Product read behind the UCP catalog capability (/api/ucp/catalog/* and the matching MCP tools), for AI agent platforms rather than the storefront. UCP_CATALOG_PRODUCTSDocument query UcpCatalogProducts(
$search: String
$filter: ProductAttributeFilterInput
$pageSize: Int!
$currentPage: Int!
) {
products(
search: $search
filter: $filter
pageSize: $pageSize
currentPage: $currentPage
) {
total_count
page_info {
current_page
page_size
total_pages
}
items {
__typename
uid
sku
name
url_key
stock_status
rating_summary
review_count
description {
html
}
image {
url
label
}
media_gallery {
url
label
position
disabled
}
categories {
name
url_path
}
price_range {
minimum_price {
regular_price {
value
currency
}
final_price {
value
currency
}
}
maximum_price {
regular_price {
value
currency
}
final_price {
value
currency
}
}
}
# Custom options: a required select-type one becomes a variant
# dimension (agentic/ucp/_lib/custom-options.ts). Text-type options
# need no values here — only that they exist and are required.
... on CustomizableProductInterface {
options {
__typename
uid
title
required
sort_order
... on CustomizableDropDownOption {
values: value {
uid
title
price
price_type
sort_order
}
}
... on CustomizableRadioOption {
values: value {
uid
title
price
price_type
sort_order
}
}
... on CustomizableCheckboxOption {
values: value {
uid
title
price
price_type
sort_order
}
}
... on CustomizableMultipleOption {
values: value {
uid
title
price
price_type
sort_order
}
}
}
}
... on ConfigurableProduct {
configurable_options {
attribute_code
label
values {
value_index
label
}
}
variants {
attributes {
code
value_index
label
}
product {
uid
sku
name
stock_status
image {
url
label
}
price_range {
minimum_price {
regular_price {
value
currency
}
final_price {
value
currency
}
}
}
}
}
}
}
}
}
Product read behind the UCP catalog capability (/api/ucp/catalog/* and the matching MCP tools), for AI agent platforms rather than the storefront.
One document serves search, batch lookup and single-product detail: $search is null for a filter-only read (lookup by SKU), and $filter carries the SKU set or the category/price narrowing. It selects stock ProductInterface fields only — no companion-module fields — so a lagging module can never 400 an agent's request, and no per-product resolvers (custom_attributesV2, only_x_left_in_stock), which would fan out across a result page.
SERVER-ONLY: run by the UCP route handlers, never by the browser. Allowlisting it would hand every visitor a second, differently-shaped product query that the storefront does not need. UCP catalog capability (/api/ucp/catalog/* and its MCP tools). Run by the route handlers on behalf of authenticated agent platforms. |
UcpCartVariantSkus query | server only | What identifies each cart line as a UCP catalog variant: the purchased child SKU of a configurable line, and the chosen custom-option value uids. UCP_CART_VARIANT_SKUSDocument query UcpCartVariantSkus($cartId: String!) {
cart(cart_id: $cartId) {
items {
uid
product {
sku
}
... on ConfigurableCartItem {
configured_variant {
sku
}
customizable_options {
values {
customizable_option_value_uid
}
}
}
... on SimpleCartItem {
customizable_options {
values {
customizable_option_value_uid
}
}
}
... on VirtualCartItem {
customizable_options {
values {
customizable_option_value_uid
}
}
}
... on DownloadableCartItem {
customizable_options {
values {
customizable_option_value_uid
}
}
}
}
}
}
What identifies each cart line as a UCP catalog variant: the purchased child SKU of a configurable line, and the chosen custom-option value uids.
The shared cart documents select a line's product, which for a configurable is the PARENT, and custom options only as labels. The agent surfaces report and match lines by the variant id a platform actually buys — the child SKU, plus any custom-option choices (agentic/ucp/_lib/ custom-options.ts) — so they read it here instead of reshaping the storefront's cart fragment (and with it the browser's allowlisted cart documents). Child SKUs of configurable cart lines, read alongside the shared cart document by the UCP and ACP checkout handlers. |
UcpCartCoupons query | server only | Coupon codes applied to a cart, for the UCP discount extension's discounts.codes. UCP_CART_COUPONSDocument query UcpCartCoupons($cartId: String!) {
cart(cart_id: $cartId) {
applied_coupons {
code
}
}
}
Coupon codes applied to a cart, for the UCP discount extension's discounts.codes.
The shared GetCartForCheckout document does not select applied_coupons and must stay verbatim (see agentic/ucp/_lib/magento.ts), so the codes are read here instead — only when the cart carries a discount, or when a platform submits codes.
SERVER-ONLY: the storefront reads coupons through its own cart documents. Coupon codes on a cart, for the UCP discount extension: the shared cart document does not select them and cannot be reshaped. |
UcpGuestOrder query | server only | One order's current state, for the UCP order capability (Get Order). UCP_GUEST_ORDERDocument query UcpGuestOrder($number: String!, $email: String!, $lastname: String!) {
guestOrder(input: { number: $number, email: $email, lastname: $lastname }) {
number
order_date
status
shipping_method
shipping_address {
firstname
lastname
street
city
region
postcode
country_code
telephone
}
billing_address {
firstname
lastname
street
city
region
postcode
country_code
telephone
}
total {
grand_total {
value
currency
}
subtotal {
value
currency
}
total_tax {
value
currency
}
total_shipping {
value
currency
}
discounts {
amount {
value
currency
}
}
}
items {
id
product_name
product_sku
quantity_ordered
quantity_shipped
quantity_canceled
quantity_refunded
product_sale_price {
value
currency
}
discounts {
amount {
value
currency
}
}
}
shipments {
id
number
tracking {
title
number
carrier
}
items {
quantity_shipped
order_item {
id
}
}
comments {
timestamp
}
}
credit_memos {
id
number
total {
grand_total {
value
currency
}
}
items {
quantity_refunded
order_item {
id
}
}
comments {
timestamp
}
}
}
}
One order's current state, for the UCP order capability (Get Order).
Stock guestOrder: UCP orders are always guest orders (an agent credential never reaches a customer account), and the route only runs this with the email and billing lastname it recorded when the order was placed through complete — the number alone reads nothing. Stock fields only, like the catalog read above, so no companion module can 400 a platform's request.
order_item { id } on shipment and credit memo lines is what ties a shipment or refund back to the order line it moved, which is how UCP's fulfillment events and adjustments reference line items. Comment timestamps are selected because Magento's GraphQL exposes no creation time for either.
SERVER-ONLY: the storefront's guest order page uses the Turnstile-gated GuestOrderLookup. This twin must never be allowlisted — it would be exactly that lookup minus the captcha. One order's state for the order capability (Get Order), read with the email + lastname recorded at complete. Never allowlisted: it is the storefront's Turnstile-gated guest lookup without the captcha. |
vat-validation
VAT number validation (Magenx_VatValidationGraphQl).
Needs: Magenx_VatValidationGraphQl
| Operation | Runs | Description |
|---|
GetVatValidationSettings query | browser | Whether VAT numbers are checked, where (checkout; registration and account details), and which countries offer the checkout field (with a placeholder example). GET_VAT_VALIDATION_SETTINGSDocument query GetVatValidationSettings {
storeConfig {
store_code
vat_validation_enabled
vat_validation_checkout
vat_validation_registration
vat_number_formats {
country_code
prefix
example
}
}
}
Whether VAT numbers are checked, where (checkout; registration and account details), and which countries offer the checkout field (with a placeholder example). Null vat_number_formats = validation off. Checkout address forms, registration and account details: whether to show the VAT number field. |
GetAccountVatValidation query | browser | The result of the signed-in customer's account VAT number, and whether the account is a verified business account (in the store's business group with a valid number). GET_ACCOUNT_VAT_VALIDATIONDocument query GetAccountVatValidation {
customer {
vat_validation {
vat_id
status
checked_at
business_account
}
}
}
The result of the signed-in customer's account VAT number, and whether the account is a verified business account (in the store's business group with a valid number). Null vat_validation = no number, or validation off. Account details: the account number's result and business status. |
GetCartVatValidation query | browser | The cart's VAT treatment as the backend sees it now: the result for the tax address's number, whether VAT is reverse charged, and whether the order can be placed. GET_CART_VAT_VALIDATIONDocument query GetCartVatValidation($cartId: String!) {
cart(cart_id: $cartId) {
id
vat_validation {
...CartVatValidationFields
}
}
}
${CART_VAT_VALIDATION_FIELDS}
The cart's VAT treatment as the backend sees it now: the result for the tax address's number, whether VAT is reverse charged, and whether the order can be placed. Null vat_validation = validation off. Checkout review step: the treatment and the "reverse charged" notice. |
RecheckCartVatNumber mutation | browser | Ask the registry again, after "we could not check your VAT number right now". RECHECK_CART_VAT_NUMBERDocument mutation RecheckCartVatNumber($cartId: String!) {
recheckCartVatNumber(input: { cart_id: $cartId }) {
cart {
id
vat_validation {
...CartVatValidationFields
}
}
}
}
${CART_VAT_VALIDATION_FIELDS}
Ask the registry again, after "we could not check your VAT number right now". Cart-scoped (the backend checks the caller owns the cart) and rate-limited there. Checkout review step: "check again" after a registry outage. Cart-scoped and rate-limited by the backend, so no Turnstile: it cannot probe numbers that are not already on the caller's own cart. |
wishlist
Wishlist.
| Operation | Runs | Description |
|---|
AddProductsToWishlist mutation | browser | ADD_PRODUCTS_TO_WISHLISTDocument mutation AddProductsToWishlist($wishlistId: ID!, $wishlistItems: [WishlistItemInput!]!) {
addProductsToWishlist(wishlistId: $wishlistId, wishlistItems: $wishlistItems) {
wishlist {
id
items_count
items_v2(pageSize: 100, currentPage: 1) {
items {
...WishlistItemFields
}
page_info {
current_page
total_pages
}
}
}
user_errors {
code
message
}
}
}
${WISHLIST_ITEM_FIELDS}
|
GetCustomerWishlist query | browser | GET_CUSTOMER_WISHLISTDocument query GetCustomerWishlist {
customer {
wishlists {
id
items_count
items_v2(pageSize: 100, currentPage: 1) {
items {
...WishlistItemFields
}
page_info {
current_page
total_pages
}
}
}
}
}
${WISHLIST_ITEM_FIELDS}
|
RemoveProductsFromWishlist mutation | browser | REMOVE_PRODUCTS_FROM_WISHLISTDocument mutation RemoveProductsFromWishlist($wishlistId: ID!, $wishlistItemsIds: [ID!]!) {
removeProductsFromWishlist(wishlistId: $wishlistId, wishlistItemsIds: $wishlistItemsIds) {
wishlist {
id
items_count
items_v2(pageSize: 100, currentPage: 1) {
items {
...WishlistItemFields
}
page_info {
current_page
total_pages
}
}
}
user_errors {
code
message
}
}
}
${WISHLIST_ITEM_FIELDS}
|