@doswiftly/storefront-operations 6.1.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3149 @@
1
+ {
2
+ "schemaVersion": "7.1.0",
3
+ "queries": [
4
+ {
5
+ "name": "Shop",
6
+ "kind": "query",
7
+ "section": "Shop",
8
+ "description": "Returns shop configuration: name, base + supported currencies, supported locales, branding (logo, colors, fonts, social links), contact info, active payment methods, brand metadata, money format template, and the list of countries the shop ships to. Public; no auth required. Call once per session and cache — almost everything else is contextualized by the shop returned here.",
9
+ "variables": [],
10
+ "fragmentRefs": [
11
+ "Shop"
12
+ ],
13
+ "body": "query Shop {\n shop {\n ...Shop\n }\n}"
14
+ },
15
+ {
16
+ "name": "Product",
17
+ "kind": "query",
18
+ "section": "Products",
19
+ "description": "Fetches a single product by `id` or `handle` (URL slug). Pass either — whichever is provided wins; if both are missing, returns null. Returns null if the product is not storefront-accessible (must be `ACTIVE` status with `PUBLIC` or `BUNDLE_ONLY` visibility).",
20
+ "variables": [
21
+ {
22
+ "name": "id",
23
+ "type": "ID",
24
+ "defaultValue": null
25
+ },
26
+ {
27
+ "name": "handle",
28
+ "type": "String",
29
+ "defaultValue": null
30
+ }
31
+ ],
32
+ "fragmentRefs": [
33
+ "ProductFull"
34
+ ],
35
+ "body": "query Product($id: ID, $handle: String) {\n product(id: $id, handle: $handle) {\n ...ProductFull\n }\n}"
36
+ },
37
+ {
38
+ "name": "ProductConfigurator",
39
+ "kind": "query",
40
+ "section": "Products",
41
+ "description": "Fetches a product together with its filtered attribute definitions, optimized for the configurator UI (e.g. customer-facing text fields, finishing options, scoped variants). `fillingMode: \"CUSTOMER\"` returns only customer-facing attributes; pass `\"BOTH\"` to also include attributes shared with the merchant admin. Single round-trip — saves a separate `attributes` query.",
42
+ "variables": [
43
+ {
44
+ "name": "handle",
45
+ "type": "String!",
46
+ "defaultValue": null
47
+ },
48
+ {
49
+ "name": "fillingMode",
50
+ "type": "String",
51
+ "defaultValue": "\"CUSTOMER\""
52
+ }
53
+ ],
54
+ "fragmentRefs": [
55
+ "ProductAttributeDefinition",
56
+ "ProductFull"
57
+ ],
58
+ "body": "query ProductConfigurator($handle: String!, $fillingMode: String = \"CUSTOMER\") {\n product(handle: $handle) {\n ...ProductFull\n attributes(filter: {fillingMode: $fillingMode}) {\n ...ProductAttributeDefinition\n }\n }\n}"
59
+ },
60
+ {
61
+ "name": "Products",
62
+ "kind": "query",
63
+ "section": "Products",
64
+ "description": "Paginated product list (Relay Connection, default page size 20, max 100). The `query` argument supports a structured search syntax — `tag:summer`, `vendor:foo`, `product_type:shirts`, `variants.price:>10`, plus `AND`/`OR`/`NOT` — falling back to free-text title/content search. The `filters[]` array uses multi-filter logic: same field name appears multiple times → OR; different fields → AND. Sort: `RELEVANCE`, `TITLE`, `PRICE`, `NEWEST`, `OLDEST`, `BEST_SELLING`. The response includes a `filters` block for faceted navigation (counts per filterable attribute value).",
65
+ "variables": [
66
+ {
67
+ "name": "first",
68
+ "type": "Int",
69
+ "defaultValue": "20"
70
+ },
71
+ {
72
+ "name": "after",
73
+ "type": "String",
74
+ "defaultValue": null
75
+ },
76
+ {
77
+ "name": "query",
78
+ "type": "String",
79
+ "defaultValue": null
80
+ },
81
+ {
82
+ "name": "sortKey",
83
+ "type": "ProductSortKeys",
84
+ "defaultValue": "RELEVANCE"
85
+ },
86
+ {
87
+ "name": "reverse",
88
+ "type": "Boolean",
89
+ "defaultValue": "false"
90
+ },
91
+ {
92
+ "name": "filters",
93
+ "type": "[ProductFilter!]",
94
+ "defaultValue": null
95
+ }
96
+ ],
97
+ "fragmentRefs": [
98
+ "PageInfo",
99
+ "ProductCard"
100
+ ],
101
+ "body": "query Products($first: Int = 20, $after: String, $query: String, $sortKey: ProductSortKeys = RELEVANCE, $reverse: Boolean = false, $filters: [ProductFilter!]) {\n products(\n first: $first\n after: $after\n query: $query\n sortKey: $sortKey\n reverse: $reverse\n filters: $filters\n ) {\n edges {\n node {\n ...ProductCard\n }\n cursor\n }\n nodes {\n ...ProductCard\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
102
+ },
103
+ {
104
+ "name": "ProductSearch",
105
+ "kind": "query",
106
+ "section": "Products",
107
+ "description": "Full-text product search — `$query` is required. Functionally equivalent to `Products` with `$query` set, minus the `sortKey` argument (search defaults to relevance ranking). Use for the search results page; combine with `filters[]` for guided refinement.",
108
+ "variables": [
109
+ {
110
+ "name": "query",
111
+ "type": "String!",
112
+ "defaultValue": null
113
+ },
114
+ {
115
+ "name": "first",
116
+ "type": "Int",
117
+ "defaultValue": "20"
118
+ },
119
+ {
120
+ "name": "after",
121
+ "type": "String",
122
+ "defaultValue": null
123
+ },
124
+ {
125
+ "name": "filters",
126
+ "type": "[ProductFilter!]",
127
+ "defaultValue": null
128
+ }
129
+ ],
130
+ "fragmentRefs": [
131
+ "PageInfo",
132
+ "ProductCard"
133
+ ],
134
+ "body": "query ProductSearch($query: String!, $first: Int = 20, $after: String, $filters: [ProductFilter!]) {\n products(query: $query, first: $first, after: $after, filters: $filters) {\n edges {\n node {\n ...ProductCard\n }\n cursor\n }\n nodes {\n ...ProductCard\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
135
+ },
136
+ {
137
+ "name": "PredictiveSearch",
138
+ "kind": "query",
139
+ "section": "Products",
140
+ "description": "Type-ahead suggestions for the storefront search input. Returns up to `$limit` matching products (hard cap 50) plus up to 5 styled query suggestions with `<mark>` tags around matched spans. Polish-language aware (handles morphology in suggestions). Run on each keystroke (debounce 200-300ms). The `$query` is capped at 100 characters server-side.",
141
+ "variables": [
142
+ {
143
+ "name": "query",
144
+ "type": "String!",
145
+ "defaultValue": null
146
+ },
147
+ {
148
+ "name": "limit",
149
+ "type": "Int",
150
+ "defaultValue": "10"
151
+ }
152
+ ],
153
+ "fragmentRefs": [
154
+ "ProductCard"
155
+ ],
156
+ "body": "query PredictiveSearch($query: String!, $limit: Int = 10) {\n predictiveSearch(query: $query, limit: $limit) {\n products {\n ...ProductCard\n }\n queries {\n text\n styledText\n }\n }\n}"
157
+ },
158
+ {
159
+ "name": "Collection",
160
+ "kind": "query",
161
+ "section": "Collections",
162
+ "description": "Fetches a single collection by `id` or `handle`, with paginated products. Collections come in two types: **MANUAL** (curated — products explicitly added by the merchant) and **AUTO** (rule-based — products matched dynamically). Both surfaces use the same field selection.",
163
+ "variables": [
164
+ {
165
+ "name": "id",
166
+ "type": "ID",
167
+ "defaultValue": null
168
+ },
169
+ {
170
+ "name": "handle",
171
+ "type": "String",
172
+ "defaultValue": null
173
+ },
174
+ {
175
+ "name": "productsFirst",
176
+ "type": "Int",
177
+ "defaultValue": "20"
178
+ },
179
+ {
180
+ "name": "productsAfter",
181
+ "type": "String",
182
+ "defaultValue": null
183
+ },
184
+ {
185
+ "name": "productsFilters",
186
+ "type": "[ProductFilter!]",
187
+ "defaultValue": null
188
+ }
189
+ ],
190
+ "fragmentRefs": [
191
+ "Collection",
192
+ "PageInfo",
193
+ "ProductCard"
194
+ ],
195
+ "body": "query Collection($id: ID, $handle: String, $productsFirst: Int = 20, $productsAfter: String, $productsFilters: [ProductFilter!]) {\n collection(id: $id, handle: $handle) {\n ...Collection\n products(\n first: $productsFirst\n after: $productsAfter\n filters: $productsFilters\n ) {\n edges {\n node {\n ...ProductCard\n }\n cursor\n }\n nodes {\n ...ProductCard\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n }\n}"
196
+ },
197
+ {
198
+ "name": "Collections",
199
+ "kind": "query",
200
+ "section": "Collections",
201
+ "description": "Paginated list of all active collections (default 20, max 100). Sort by `TITLE` or `UPDATED_AT` via `sortKey`. Note: the `query` argument is reserved for future text filtering — it is currently accepted but ignored.",
202
+ "variables": [
203
+ {
204
+ "name": "first",
205
+ "type": "Int",
206
+ "defaultValue": "20"
207
+ },
208
+ {
209
+ "name": "after",
210
+ "type": "String",
211
+ "defaultValue": null
212
+ },
213
+ {
214
+ "name": "query",
215
+ "type": "String",
216
+ "defaultValue": null
217
+ },
218
+ {
219
+ "name": "sortKey",
220
+ "type": "CollectionSortKeys",
221
+ "defaultValue": "TITLE"
222
+ },
223
+ {
224
+ "name": "reverse",
225
+ "type": "Boolean",
226
+ "defaultValue": "false"
227
+ }
228
+ ],
229
+ "fragmentRefs": [
230
+ "Collection",
231
+ "PageInfo"
232
+ ],
233
+ "body": "query Collections($first: Int = 20, $after: String, $query: String, $sortKey: CollectionSortKeys = TITLE, $reverse: Boolean = false) {\n collections(\n first: $first\n after: $after\n query: $query\n sortKey: $sortKey\n reverse: $reverse\n ) {\n edges {\n node {\n ...Collection\n }\n cursor\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
234
+ },
235
+ {
236
+ "name": "Category",
237
+ "kind": "query",
238
+ "section": "Categories",
239
+ "description": "Fetches a single category by `id` or `slug` with its parent and immediate children. Use for breadcrumbs and sub-navigation. Nested queries on `parent` / `children` are batched server-side — safe to use in lists without N+1 concerns.",
240
+ "variables": [
241
+ {
242
+ "name": "id",
243
+ "type": "ID",
244
+ "defaultValue": null
245
+ },
246
+ {
247
+ "name": "slug",
248
+ "type": "String",
249
+ "defaultValue": null
250
+ }
251
+ ],
252
+ "fragmentRefs": [
253
+ "Category"
254
+ ],
255
+ "body": "query Category($id: ID, $slug: String) {\n category(id: $id, slug: $slug) {\n ...Category\n parent {\n ...Category\n }\n children {\n ...Category\n }\n }\n}"
256
+ },
257
+ {
258
+ "name": "Categories",
259
+ "kind": "query",
260
+ "section": "Categories",
261
+ "description": "Returns active categories for the shop. Each category exposes its `parent` and `children` — build the tree client-side by walking those fields (server batches the lookups, no N+1). The hierarchy is not depth-capped server-side. Use for nav mega-menus and category pages.",
262
+ "variables": [],
263
+ "fragmentRefs": [
264
+ "Category"
265
+ ],
266
+ "body": "query Categories {\n categories {\n roots {\n ...Category\n children {\n ...Category\n children {\n ...Category\n }\n }\n }\n totalCount\n }\n}"
267
+ },
268
+ {
269
+ "name": "Cart",
270
+ "kind": "query",
271
+ "section": "Cart",
272
+ "description": "Fetches a cart by `id` (the value persisted by the SDK in the `cart-id` cookie). The cart query is public — no auth needed to read it — but once a customer logs in and gets associated with the cart, mutations enforce ownership. Returns line items (paginated up to 100), totals, applied discount codes, gift cards, buyer identity, note, attributes, and warnings. Refetch after every cart mutation.",
273
+ "variables": [
274
+ {
275
+ "name": "id",
276
+ "type": "ID!",
277
+ "defaultValue": null
278
+ }
279
+ ],
280
+ "fragmentRefs": [
281
+ "Cart"
282
+ ],
283
+ "body": "query Cart($id: ID!) {\n cart(id: $id) {\n ...Cart\n }\n}"
284
+ },
285
+ {
286
+ "name": "Customer",
287
+ "kind": "query",
288
+ "section": "Customer (requires auth)",
289
+ "description": "Full customer profile — basic info plus the first 10 addresses and first 10 orders. Heaviest customer query; for narrow use cases prefer `CustomerProfile` (no orders / addresses) or `CustomerOrder` (single order). Returns null if unauthenticated.",
290
+ "variables": [],
291
+ "fragmentRefs": [
292
+ "Customer",
293
+ "MailingAddress",
294
+ "Order",
295
+ "PageInfo"
296
+ ],
297
+ "body": "query Customer {\n customer {\n ...Customer\n addresses(first: 10) {\n edges {\n cursor\n node {\n ...MailingAddress\n }\n }\n nodes {\n ...MailingAddress\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n orders(first: 10) {\n edges {\n node {\n ...Order\n }\n cursor\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n }\n}"
298
+ },
299
+ {
300
+ "name": "CustomerProfile",
301
+ "kind": "query",
302
+ "section": "Customer (requires auth)",
303
+ "description": "Lightweight customer profile (no orders, no addresses list). Use for settings / profile pages that only need basic customer info — much cheaper than `Customer`. Returns null if unauthenticated.",
304
+ "variables": [],
305
+ "fragmentRefs": [
306
+ "Customer"
307
+ ],
308
+ "body": "query CustomerProfile {\n customer {\n ...Customer\n }\n}"
309
+ },
310
+ {
311
+ "name": "CustomerOrder",
312
+ "kind": "query",
313
+ "section": "Customer (requires auth)",
314
+ "description": "Single order by `orderId`. Returns only orders that belong to the authenticated customer (cross-customer access returns null, not an error). Much cheaper than fetching the full `Customer` payload to access one order. Use on the order detail page.",
315
+ "variables": [
316
+ {
317
+ "name": "orderId",
318
+ "type": "ID!",
319
+ "defaultValue": null
320
+ }
321
+ ],
322
+ "fragmentRefs": [
323
+ "Order"
324
+ ],
325
+ "body": "query CustomerOrder($orderId: ID!) {\n customerOrder(orderId: $orderId) {\n ...Order\n }\n}"
326
+ },
327
+ {
328
+ "name": "Checkout",
329
+ "kind": "query",
330
+ "section": "Checkout",
331
+ "description": "Fetches a checkout session by `id`. **Important**: `checkoutId` and `cartId` are 1:1 — there is no separate \"checkout\" record, the response is built dynamically from the cart. Returns line items, addresses, selected shipping rate, available shipping rates + payment methods, applied discount/gift cards (gift card codes are masked for security), and totals (`cost`, `tax`, `paymentDue`). Public read; ownership enforced on mutations. Refetch after every checkout mutation.",
332
+ "variables": [
333
+ {
334
+ "name": "id",
335
+ "type": "ID!",
336
+ "defaultValue": null
337
+ }
338
+ ],
339
+ "fragmentRefs": [
340
+ "Checkout"
341
+ ],
342
+ "body": "query Checkout($id: ID!) {\n checkout(id: $id) {\n ...Checkout\n }\n}"
343
+ },
344
+ {
345
+ "name": "AvailablePaymentMethods",
346
+ "kind": "query",
347
+ "section": "Payment Methods",
348
+ "description": "Returns the active payment methods for the shop, sorted by the merchant-configured display position. Shop-level — does NOT vary by cart amount or currency. Each method exposes `type` (`CARD`, `BANK_TRANSFER`, `BLIK`, `PAYPAL`, `APPLE_PAY`, `GOOGLE_PAY`, `CASH_ON_DELIVERY`, `OTHER`), provider, icon, description, and supported currencies. Use to render the payment step of checkout.",
349
+ "variables": [],
350
+ "fragmentRefs": [
351
+ "AvailablePaymentMethods"
352
+ ],
353
+ "body": "query AvailablePaymentMethods {\n availablePaymentMethods {\n ...AvailablePaymentMethods\n }\n}"
354
+ },
355
+ {
356
+ "name": "Shipment",
357
+ "kind": "query",
358
+ "section": "Shipments / Tracking",
359
+ "description": "Fetches a shipment by `id` with status, tracking events, recipient address, and shipped/delivered timestamps. **Auth required** — customer access token plus ownership of the parent order. Wrapped response: `{ shipment, userErrors[] }`. Error codes: `INVALID_TOKEN`, `NOT_FOUND` (also returned on ownership mismatch to prevent enumeration), `FETCH_FAILED`.",
360
+ "variables": [
361
+ {
362
+ "name": "id",
363
+ "type": "ID!",
364
+ "defaultValue": null
365
+ }
366
+ ],
367
+ "fragmentRefs": [
368
+ "Shipment",
369
+ "UserError"
370
+ ],
371
+ "body": "query Shipment($id: ID!) {\n shipment(id: $id) {\n shipment {\n ...Shipment\n }\n userErrors {\n ...UserError\n }\n }\n}"
372
+ },
373
+ {
374
+ "name": "ShipmentByTrackingNumber",
375
+ "kind": "query",
376
+ "section": "Shipments / Tracking",
377
+ "description": "**Public** shipment lookup by carrier tracking number — no auth required. Designed for \"Track my order\" landing pages reachable without login. Returns the basic shipment fragment including recipient address. Wrapped response: `{ shipment, userErrors[] }`. Error codes: `INVALID_INPUT`, `NOT_FOUND`, `FETCH_FAILED`.",
378
+ "variables": [
379
+ {
380
+ "name": "trackingNumber",
381
+ "type": "String!",
382
+ "defaultValue": null
383
+ }
384
+ ],
385
+ "fragmentRefs": [
386
+ "ShipmentBasic",
387
+ "UserError"
388
+ ],
389
+ "body": "query ShipmentByTrackingNumber($trackingNumber: String!) {\n shipmentByTrackingNumber(trackingNumber: $trackingNumber) {\n shipment {\n ...ShipmentBasic\n }\n userErrors {\n ...UserError\n }\n }\n}"
390
+ },
391
+ {
392
+ "name": "Return",
393
+ "kind": "query",
394
+ "section": "Returns / RMA",
395
+ "description": "Fetches a single return (RMA) by `id` with line items, refund/compensation info, and history. **Auth required** — customer access token plus ownership of the return. Wrapped response: `{ return, userErrors[] }`. Error codes: `INVALID_TOKEN`, `NOT_FOUND` (also returned on ownership mismatch), `FETCH_FAILED`.",
396
+ "variables": [
397
+ {
398
+ "name": "id",
399
+ "type": "ID!",
400
+ "defaultValue": null
401
+ }
402
+ ],
403
+ "fragmentRefs": [
404
+ "Return",
405
+ "UserError"
406
+ ],
407
+ "body": "query Return($id: ID!) {\n return(id: $id) {\n return {\n ...Return\n }\n userErrors {\n ...UserError\n }\n }\n}"
408
+ },
409
+ {
410
+ "name": "ReturnsByOrder",
411
+ "kind": "query",
412
+ "section": "Returns / RMA",
413
+ "description": "Lists returns for a given order (paginated, default page size 20, cursor-based). **Auth required** — customer access token plus ownership of the order; the connection is empty (no explicit error) on auth failure. Use on the order detail page to show return history.",
414
+ "variables": [
415
+ {
416
+ "name": "orderId",
417
+ "type": "ID!",
418
+ "defaultValue": null
419
+ }
420
+ ],
421
+ "fragmentRefs": [
422
+ "PageInfo",
423
+ "Return"
424
+ ],
425
+ "body": "query ReturnsByOrder($orderId: ID!) {\n returnsByOrder(orderId: $orderId) {\n edges {\n node {\n ...Return\n }\n cursor\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
426
+ },
427
+ {
428
+ "name": "ReturnReasons",
429
+ "kind": "query",
430
+ "section": "Returns / RMA",
431
+ "description": "Returns the standard list of return reasons used by the RMA flow: `DEFECTIVE`, `NOT_AS_DESCRIBED`, `WRONG_ITEM`, `CHANGED_MIND`, `BETTER_PRICE`, `DAMAGED_SHIPPING`, `OTHER`. The list is fixed across all shops — not per-shop configurable. Public; no auth required.",
432
+ "variables": [],
433
+ "fragmentRefs": [
434
+ "ReturnReasonOption"
435
+ ],
436
+ "body": "query ReturnReasons {\n returnReasons {\n ...ReturnReasonOption\n }\n}"
437
+ },
438
+ {
439
+ "name": "GiftCard",
440
+ "kind": "query",
441
+ "section": "Gift Cards",
442
+ "description": "Public gift-card lookup by `code`. Returns balance, currency, expiry, and `maskedCode` (first 4 + last 4 chars only — the full code never leaks back). Returns null if the code is unknown (rather than an explicit error, to limit enumeration). **Rate-limited**: 10 requests per 60 seconds per IP.",
443
+ "variables": [
444
+ {
445
+ "name": "code",
446
+ "type": "String!",
447
+ "defaultValue": null
448
+ }
449
+ ],
450
+ "fragmentRefs": [
451
+ "GiftCard"
452
+ ],
453
+ "body": "query GiftCard($code: String!) {\n giftCard(code: $code) {\n ...GiftCard\n }\n}"
454
+ },
455
+ {
456
+ "name": "GiftCardValidate",
457
+ "kind": "query",
458
+ "section": "Gift Cards",
459
+ "description": "Validates whether a gift card is usable (and optionally for a given `$amount`). Checks status (`DISABLED`, `USED`, `EXPIRED`), expiry date, and — when `$amount` is provided — sufficient balance. Returns `{ validation: { isValid, availableBalance, error: { code, message } }, userErrors[] }`. Validation error codes: `NOT_FOUND`, `DISABLED`, `ALREADY_USED`, `EXPIRED`, `INSUFFICIENT_BALANCE`. **Rate-limited**: 10 / 60s.",
460
+ "variables": [
461
+ {
462
+ "name": "code",
463
+ "type": "String!",
464
+ "defaultValue": null
465
+ },
466
+ {
467
+ "name": "amount",
468
+ "type": "Float",
469
+ "defaultValue": null
470
+ }
471
+ ],
472
+ "fragmentRefs": [
473
+ "GiftCardValidation",
474
+ "UserError"
475
+ ],
476
+ "body": "query GiftCardValidate($code: String!, $amount: Float) {\n giftCardValidate(code: $code, amount: $amount) {\n validation {\n ...GiftCardValidation\n }\n userErrors {\n ...UserError\n }\n }\n}"
477
+ },
478
+ {
479
+ "name": "AvailableShippingMethods",
480
+ "kind": "query",
481
+ "section": "Shipping Methods",
482
+ "description": "Returns shipping methods for a given destination address and cart shape (subtotal, total weight, currency). The query computes everything from the inputs alone — no existing cart is required, so it can be used for \"shipping cost preview\" UIs before the customer adds anything to a cart. Each method includes price, free-shipping progress (`{ qualifies, currentAmount, threshold, remaining, progressPercent }`), estimated delivery, and carrier metadata. Sorted by the merchant's `sortOrder`, then by price.",
483
+ "variables": [
484
+ {
485
+ "name": "address",
486
+ "type": "ShippingAddressInput!",
487
+ "defaultValue": null
488
+ },
489
+ {
490
+ "name": "cart",
491
+ "type": "CartShippingInput",
492
+ "defaultValue": null
493
+ }
494
+ ],
495
+ "fragmentRefs": [
496
+ "AvailableShippingMethod",
497
+ "FreeShippingProgress",
498
+ "UserError"
499
+ ],
500
+ "body": "query AvailableShippingMethods($address: ShippingAddressInput!, $cart: CartShippingInput) {\n availableShippingMethods(address: $address, cart: $cart) {\n methods {\n ...AvailableShippingMethod\n }\n freeShippingProgress {\n ...FreeShippingProgress\n }\n userErrors {\n ...UserError\n }\n }\n}"
501
+ },
502
+ {
503
+ "name": "AvailableFilters",
504
+ "kind": "query",
505
+ "section": "Attribute Filters",
506
+ "description": "Returns the dynamic facet filters available for a listing context — pass `collectionId`, `categoryId`, or `searchQuery`. For each visible & filterable attribute, returns either discrete value counts (for `SELECT` / `CHECKBOX` types) or numeric range bounds (for `SLIDER` types). Plus `priceRange`, per-category counts, `activeCount` (length of `currentFilters` input), and `matchCount` (total products in the context). Use to render filter sidebars on listing/search pages.",
507
+ "variables": [
508
+ {
509
+ "name": "input",
510
+ "type": "AvailableFiltersInput",
511
+ "defaultValue": null
512
+ }
513
+ ],
514
+ "fragmentRefs": [
515
+ "AvailableFilters"
516
+ ],
517
+ "body": "query AvailableFilters($input: AvailableFiltersInput) {\n availableFilters(input: $input) {\n ...AvailableFilters\n }\n}"
518
+ },
519
+ {
520
+ "name": "LoyaltyMember",
521
+ "kind": "query",
522
+ "section": "Loyalty Program",
523
+ "description": "Returns the logged-in customer's loyalty membership: points (current, pending, redeemed, expired, expiring), current tier, tier progress, annual spend, last activity. Returns null if the customer is not enrolled — there is **no auto-enrollment** here (enrollment happens via signup or a first qualifying order). Auth required.",
524
+ "variables": [],
525
+ "fragmentRefs": [
526
+ "LoyaltyMember"
527
+ ],
528
+ "body": "query LoyaltyMember {\n loyaltyMember {\n ...LoyaltyMember\n }\n}"
529
+ },
530
+ {
531
+ "name": "LoyaltyTiers",
532
+ "kind": "query",
533
+ "section": "Loyalty Program",
534
+ "description": "Lists the loyalty tiers configured for the shop (`BRONZE`, `SILVER`, `GOLD`, `PLATINUM`, `DIAMOND` etc.) with their `minPoints`, `minAnnualSpend`, `pointsMultiplier`, and custom benefits. Sorted by `minPoints` ASC. Public; no auth required.",
535
+ "variables": [],
536
+ "fragmentRefs": [
537
+ "LoyaltyTier"
538
+ ],
539
+ "body": "query LoyaltyTiers {\n loyaltyTiers {\n ...LoyaltyTier\n }\n}"
540
+ },
541
+ {
542
+ "name": "LoyaltyRewards",
543
+ "kind": "query",
544
+ "section": "Loyalty Program",
545
+ "description": "Lists rewards customers can redeem (free shipping, percent off, free product, gift card). Filtered to **active** rewards only (`is_active = true` AND inside their `starts_at`/`ends_at` window). Public; no auth required.",
546
+ "variables": [],
547
+ "fragmentRefs": [
548
+ "LoyaltyReward"
549
+ ],
550
+ "body": "query LoyaltyRewards {\n loyaltyRewards {\n ...LoyaltyReward\n }\n}"
551
+ },
552
+ {
553
+ "name": "LoyaltyTransactions",
554
+ "kind": "query",
555
+ "section": "Loyalty Program",
556
+ "description": "Paginated history of loyalty point transactions for the logged-in customer (default 20). Transaction `type` enum: `EARN_PURCHASE`, `EARN_SIGNUP`, `EARN_REFERRAL`, `EARN_REVIEW`, `EARN_BIRTHDAY`, `EARN_BONUS`, `REDEEM`, `EXPIRE`, `ADJUST`, `REFUND_REVERSAL`. Auth required — empty connection if unauthenticated.",
557
+ "variables": [
558
+ {
559
+ "name": "first",
560
+ "type": "Int",
561
+ "defaultValue": "20"
562
+ },
563
+ {
564
+ "name": "after",
565
+ "type": "String",
566
+ "defaultValue": null
567
+ }
568
+ ],
569
+ "fragmentRefs": [
570
+ "LoyaltyPageInfo",
571
+ "LoyaltyTransaction"
572
+ ],
573
+ "body": "query LoyaltyTransactions($first: Int = 20, $after: String) {\n loyaltyTransactions(first: $first, after: $after) {\n edges {\n node {\n ...LoyaltyTransaction\n }\n cursor\n }\n pageInfo {\n ...LoyaltyPageInfo\n }\n totalCount\n }\n}"
574
+ },
575
+ {
576
+ "name": "LoyaltySettings",
577
+ "kind": "query",
578
+ "section": "Loyalty Program",
579
+ "description": "Returns the loyalty program configuration: `isEnabled`, `pointsName` (e.g. \"stars\"), `pointsPerCurrency`, `pointsExpiryMonths`, available earn actions, referral settings. Use this at app boot to decide whether to render any loyalty UI at all. Public; no auth required.",
580
+ "variables": [],
581
+ "fragmentRefs": [
582
+ "LoyaltySettings"
583
+ ],
584
+ "body": "query LoyaltySettings {\n loyaltySettings {\n ...LoyaltySettings\n }\n}"
585
+ },
586
+ {
587
+ "name": "EstimatePoints",
588
+ "kind": "query",
589
+ "section": "Loyalty Program",
590
+ "description": "Estimates how many loyalty points the customer would earn for an order of `$orderTotal` (in major currency units). When the customer is authenticated, the result accounts for their current tier's points multiplier. Use on cart/checkout to show \"Earn X points with this order\".",
591
+ "variables": [
592
+ {
593
+ "name": "orderTotal",
594
+ "type": "Float!",
595
+ "defaultValue": null
596
+ }
597
+ ],
598
+ "fragmentRefs": [
599
+ "PointsEstimate"
600
+ ],
601
+ "body": "query EstimatePoints($orderTotal: Float!) {\n estimatePoints(orderTotal: $orderTotal) {\n ...PointsEstimate\n }\n}"
602
+ },
603
+ {
604
+ "name": "ReferralStats",
605
+ "kind": "query",
606
+ "section": "Loyalty Program",
607
+ "description": "Returns the customer's referral statistics: `referralCode`, `shareUrl`, `totalReferred`, `completedReferrals`, `pendingReferrals`, `totalPointsEarned`. Auth required. Returns null if unauthenticated or if the referral program is disabled for the shop.",
608
+ "variables": [],
609
+ "fragmentRefs": [
610
+ "ReferralStats"
611
+ ],
612
+ "body": "query ReferralStats {\n referralStats {\n ...ReferralStats\n }\n}"
613
+ },
614
+ {
615
+ "name": "ProductReviews",
616
+ "kind": "query",
617
+ "section": "Reviews",
618
+ "description": "Paginated list of customer reviews for a product, **filtered to APPROVED reviews only** (PENDING / REJECTED reviews are not exposed to the storefront). Sort by `CREATED_AT` (default), helpfulness, or rating. Public; no auth required.",
619
+ "variables": [
620
+ {
621
+ "name": "productId",
622
+ "type": "ID!",
623
+ "defaultValue": null
624
+ },
625
+ {
626
+ "name": "first",
627
+ "type": "Int",
628
+ "defaultValue": "10"
629
+ },
630
+ {
631
+ "name": "after",
632
+ "type": "String",
633
+ "defaultValue": null
634
+ },
635
+ {
636
+ "name": "sortKey",
637
+ "type": "ReviewSortKey",
638
+ "defaultValue": "CREATED_AT"
639
+ },
640
+ {
641
+ "name": "reverse",
642
+ "type": "Boolean",
643
+ "defaultValue": "true"
644
+ }
645
+ ],
646
+ "fragmentRefs": [
647
+ "PageInfo",
648
+ "ProductReview"
649
+ ],
650
+ "body": "query ProductReviews($productId: ID!, $first: Int = 10, $after: String, $sortKey: ReviewSortKey = CREATED_AT, $reverse: Boolean = true) {\n productReviews(\n productId: $productId\n first: $first\n after: $after\n sortKey: $sortKey\n reverse: $reverse\n ) {\n edges {\n node {\n ...ProductReview\n }\n cursor\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
651
+ },
652
+ {
653
+ "name": "ReviewStats",
654
+ "kind": "query",
655
+ "section": "Reviews",
656
+ "description": "Aggregate review statistics for a product: average rating, total count, distribution per star (1-5). Computed from APPROVED reviews only. Use for product card review summaries. Public; no auth required.",
657
+ "variables": [
658
+ {
659
+ "name": "productId",
660
+ "type": "ID!",
661
+ "defaultValue": null
662
+ }
663
+ ],
664
+ "fragmentRefs": [
665
+ "ReviewStats"
666
+ ],
667
+ "body": "query ReviewStats($productId: ID!) {\n reviewStats(productId: $productId) {\n ...ReviewStats\n }\n}"
668
+ },
669
+ {
670
+ "name": "Wishlists",
671
+ "kind": "query",
672
+ "section": "Wishlists",
673
+ "description": "Paginated list of the logged-in customer's wishlists (default 20). Auth required — empty connection if unauthenticated. Customers typically have a small set (<10).",
674
+ "variables": [
675
+ {
676
+ "name": "first",
677
+ "type": "Int",
678
+ "defaultValue": "20"
679
+ },
680
+ {
681
+ "name": "after",
682
+ "type": "String",
683
+ "defaultValue": null
684
+ }
685
+ ],
686
+ "fragmentRefs": [
687
+ "Wishlist"
688
+ ],
689
+ "body": "query Wishlists($first: Int = 20, $after: String) {\n wishlists(first: $first, after: $after) {\n edges {\n cursor\n node {\n ...Wishlist\n }\n }\n nodes {\n ...Wishlist\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n }\n}"
690
+ },
691
+ {
692
+ "name": "WishlistById",
693
+ "kind": "query",
694
+ "section": "Wishlists",
695
+ "description": "Fetches a single wishlist by `id`. Private wishlists are visible only to the owner; public wishlists are visible to anyone. Note: this query supports lookup by `id` only — there is currently no way to fetch a wishlist by its share token.",
696
+ "variables": [
697
+ {
698
+ "name": "id",
699
+ "type": "ID!",
700
+ "defaultValue": null
701
+ }
702
+ ],
703
+ "fragmentRefs": [
704
+ "Wishlist"
705
+ ],
706
+ "body": "query WishlistById($id: ID!) {\n wishlist(id: $id) {\n ...Wishlist\n }\n}"
707
+ },
708
+ {
709
+ "name": "BlogPosts",
710
+ "kind": "query",
711
+ "section": "Blog",
712
+ "description": "Paginated list of published blog posts. Filter by `categorySlug`, `tagSlug`, or `featured` (boolean flag, not enum). Sort: `PUBLISHED_AT` (default), `TITLE`, `VIEW_COUNT`, or `CREATED_AT`. Public; no auth required.",
713
+ "variables": [
714
+ {
715
+ "name": "first",
716
+ "type": "Int",
717
+ "defaultValue": "20"
718
+ },
719
+ {
720
+ "name": "after",
721
+ "type": "String",
722
+ "defaultValue": null
723
+ },
724
+ {
725
+ "name": "categorySlug",
726
+ "type": "String",
727
+ "defaultValue": null
728
+ },
729
+ {
730
+ "name": "tagSlug",
731
+ "type": "String",
732
+ "defaultValue": null
733
+ },
734
+ {
735
+ "name": "featured",
736
+ "type": "Boolean",
737
+ "defaultValue": null
738
+ },
739
+ {
740
+ "name": "sortKey",
741
+ "type": "BlogPostSortKey",
742
+ "defaultValue": "PUBLISHED_AT"
743
+ },
744
+ {
745
+ "name": "reverse",
746
+ "type": "Boolean",
747
+ "defaultValue": "false"
748
+ }
749
+ ],
750
+ "fragmentRefs": [
751
+ "BlogPost",
752
+ "PageInfo"
753
+ ],
754
+ "body": "query BlogPosts($first: Int = 20, $after: String, $categorySlug: String, $tagSlug: String, $featured: Boolean, $sortKey: BlogPostSortKey = PUBLISHED_AT, $reverse: Boolean = false) {\n blogPosts(\n first: $first\n after: $after\n categorySlug: $categorySlug\n tagSlug: $tagSlug\n featured: $featured\n sortKey: $sortKey\n reverse: $reverse\n ) {\n edges {\n node {\n ...BlogPost\n }\n cursor\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
755
+ },
756
+ {
757
+ "name": "BlogPost",
758
+ "kind": "query",
759
+ "section": "Blog",
760
+ "description": "Fetches a single blog post by `id` or `slug`. Visibility-gated: returns null if the post is not yet `PUBLISHED` or if its publish date is in the future (scheduled posts stay hidden until their publish time). Side effect: fetching a post increments its `view_count` asynchronously (does not block the response).",
761
+ "variables": [
762
+ {
763
+ "name": "id",
764
+ "type": "ID",
765
+ "defaultValue": null
766
+ },
767
+ {
768
+ "name": "slug",
769
+ "type": "String",
770
+ "defaultValue": null
771
+ }
772
+ ],
773
+ "fragmentRefs": [
774
+ "BlogPost"
775
+ ],
776
+ "body": "query BlogPost($id: ID, $slug: String) {\n blogPost(id: $id, slug: $slug) {\n ...BlogPost\n }\n}"
777
+ },
778
+ {
779
+ "name": "BlogCategories",
780
+ "kind": "query",
781
+ "section": "Blog",
782
+ "description": "Lists all blog categories with per-category `postCount` and SEO metadata. Use to render category navigation on blog pages. Public; no auth required.",
783
+ "variables": [],
784
+ "fragmentRefs": [
785
+ "BlogCategory"
786
+ ],
787
+ "body": "query BlogCategories {\n blogCategories {\n ...BlogCategory\n }\n}"
788
+ },
789
+ {
790
+ "name": "BlogTags",
791
+ "kind": "query",
792
+ "section": "Blog",
793
+ "description": "Lists blog tags with usage counts (`postCount` per tag). Use to render a tag cloud. Public; no auth required.",
794
+ "variables": [],
795
+ "fragmentRefs": [
796
+ "BlogTag"
797
+ ],
798
+ "body": "query BlogTags {\n blogTags {\n ...BlogTag\n }\n}"
799
+ },
800
+ {
801
+ "name": "ProductRecommendations",
802
+ "kind": "query",
803
+ "section": "Recommendations",
804
+ "description": "Returns up to `$limit` recommended products related to `$productId`. Default `$intent: SIMILAR` — products sharing categories or tags. Use on PDP \"You may also like\" sections. Public; no auth required.",
805
+ "variables": [
806
+ {
807
+ "name": "productId",
808
+ "type": "ID!",
809
+ "defaultValue": null
810
+ },
811
+ {
812
+ "name": "limit",
813
+ "type": "Int",
814
+ "defaultValue": "8"
815
+ },
816
+ {
817
+ "name": "intent",
818
+ "type": "RecommendationIntent",
819
+ "defaultValue": "SIMILAR"
820
+ }
821
+ ],
822
+ "fragmentRefs": [
823
+ "ProductCard"
824
+ ],
825
+ "body": "query ProductRecommendations($productId: ID!, $limit: Int = 8, $intent: RecommendationIntent = SIMILAR) {\n productRecommendations(productId: $productId, limit: $limit, intent: $intent) {\n ...ProductCard\n }\n}"
826
+ },
827
+ {
828
+ "name": "Page",
829
+ "kind": "query",
830
+ "section": "Content: Pages",
831
+ "description": "Fetches a single CMS page (About, Privacy, Returns Policy, Terms, etc.) by `handle` or `id`. Visibility-gated: returns null if the page is hidden or if its publish date is in the future. Public; no auth required.",
832
+ "variables": [
833
+ {
834
+ "name": "handle",
835
+ "type": "String",
836
+ "defaultValue": null
837
+ },
838
+ {
839
+ "name": "id",
840
+ "type": "ID",
841
+ "defaultValue": null
842
+ }
843
+ ],
844
+ "fragmentRefs": [
845
+ "ShopPage"
846
+ ],
847
+ "body": "query Page($handle: String, $id: ID) {\n page(handle: $handle, id: $id) {\n ...ShopPage\n }\n}"
848
+ },
849
+ {
850
+ "name": "Pages",
851
+ "kind": "query",
852
+ "section": "Content: Pages",
853
+ "description": "Paginated list of visible, already-published CMS pages. Use for sitemap, footer link list, or page directory. The `query` argument supports text search over the page title/handle. Public; no auth required.",
854
+ "variables": [
855
+ {
856
+ "name": "first",
857
+ "type": "Int",
858
+ "defaultValue": "20"
859
+ },
860
+ {
861
+ "name": "after",
862
+ "type": "String",
863
+ "defaultValue": null
864
+ },
865
+ {
866
+ "name": "sortKey",
867
+ "type": "PageSortKeys",
868
+ "defaultValue": "TITLE"
869
+ },
870
+ {
871
+ "name": "reverse",
872
+ "type": "Boolean",
873
+ "defaultValue": "false"
874
+ },
875
+ {
876
+ "name": "query",
877
+ "type": "String",
878
+ "defaultValue": null
879
+ }
880
+ ],
881
+ "fragmentRefs": [
882
+ "PageInfo",
883
+ "ShopPage"
884
+ ],
885
+ "body": "query Pages($first: Int = 20, $after: String, $sortKey: PageSortKeys = TITLE, $reverse: Boolean = false, $query: String) {\n pages(\n first: $first\n after: $after\n sortKey: $sortKey\n reverse: $reverse\n query: $query\n ) {\n edges {\n node {\n ...ShopPage\n }\n cursor\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n}"
886
+ },
887
+ {
888
+ "name": "Menu",
889
+ "kind": "query",
890
+ "section": "Content: Navigation Menus",
891
+ "description": "Fetches a navigation menu by `handle` (e.g. `\"main-menu\"`, `\"footer\"`, `\"mobile\"`). Returns the nested item tree. Each item is typed as one of: `HTTP`, `FRONTPAGE`, `SEARCH`, `CATALOG`, `BLOG`, `PRODUCT`, `COLLECTION`, `CATEGORY`, or `PAGE` — switch on the type to render the right link target. Linked resources and URLs are resolved on demand by the field selections in the `Menu` fragment.",
892
+ "variables": [
893
+ {
894
+ "name": "handle",
895
+ "type": "String!",
896
+ "defaultValue": null
897
+ }
898
+ ],
899
+ "fragmentRefs": [
900
+ "Menu"
901
+ ],
902
+ "body": "query Menu($handle: String!) {\n menu(handle: $handle) {\n ...Menu\n }\n}"
903
+ },
904
+ {
905
+ "name": "UrlRedirects",
906
+ "kind": "query",
907
+ "section": "Content: URL Redirects",
908
+ "description": "Returns the shop's URL redirects (legacy `path` → new `target` mappings). Use server-side at the edge or in SSR to issue 301 redirects for migrated routes (preserves SEO equity). Default page size 250 — most shops fit in a single page.",
909
+ "variables": [
910
+ {
911
+ "name": "first",
912
+ "type": "Int",
913
+ "defaultValue": "250"
914
+ },
915
+ {
916
+ "name": "after",
917
+ "type": "String",
918
+ "defaultValue": null
919
+ }
920
+ ],
921
+ "fragmentRefs": [
922
+ "PageInfo",
923
+ "UrlRedirect"
924
+ ],
925
+ "body": "query UrlRedirects($first: Int = 250, $after: String) {\n urlRedirects(first: $first, after: $after) {\n nodes {\n ...UrlRedirect\n }\n pageInfo {\n ...PageInfo\n }\n }\n}"
926
+ },
927
+ {
928
+ "name": "ProductStoreAvailability",
929
+ "kind": "query",
930
+ "section": "Store Availability: per-location stock (BOPIS / multi-location)",
931
+ "description": "Fetches a product (by `handle` or `id`) along with per-variant availability across the merchant's physical locations — for the BOPIS / multi-location flow. The `storeAvailability` connection lives on each `ProductVariant`; its arguments (`first`, `after`, `near`, `locationType`) are set inside the `VariantStoreAvailability` fragment. The connection returns null for single-location shops (in which case the storefront can skip the store picker entirely). `availableStock` is null for anonymous users and an integer for authenticated customers. Apply `@inContext(preferredLocationId: ...)` on the operation to pin the customer's preferred location to the top of the result.",
932
+ "variables": [
933
+ {
934
+ "name": "handle",
935
+ "type": "String",
936
+ "defaultValue": null
937
+ },
938
+ {
939
+ "name": "id",
940
+ "type": "ID",
941
+ "defaultValue": null
942
+ }
943
+ ],
944
+ "fragmentRefs": [
945
+ "VariantStoreAvailability"
946
+ ],
947
+ "body": "query ProductStoreAvailability($handle: String, $id: ID) {\n product(handle: $handle, id: $id) {\n id\n handle\n title\n variants {\n ...VariantStoreAvailability\n }\n }\n}"
948
+ },
949
+ {
950
+ "name": "Locations",
951
+ "kind": "query",
952
+ "section": "Locations (store picker UI)",
953
+ "description": "Paginated list of active store locations (default 20, max 100). Filters: `near` (`{ latitude, longitude }`) for proximity search — sorts ascending by distance; `hasPickupEnabled` for pickup-only filtering; `locationType` (`RETAIL`, `WAREHOUSE`, `PICKUP_POINT`). When `near` is omitted, results are sorted by the merchant's `priority`, then name. Use for the BOPIS store picker UI. Public; no auth required.",
954
+ "variables": [
955
+ {
956
+ "name": "first",
957
+ "type": "Int",
958
+ "defaultValue": "20"
959
+ },
960
+ {
961
+ "name": "after",
962
+ "type": "String",
963
+ "defaultValue": null
964
+ },
965
+ {
966
+ "name": "near",
967
+ "type": "GeoCoordinateInput",
968
+ "defaultValue": null
969
+ },
970
+ {
971
+ "name": "hasPickupEnabled",
972
+ "type": "Boolean",
973
+ "defaultValue": null
974
+ },
975
+ {
976
+ "name": "locationType",
977
+ "type": "LocationType",
978
+ "defaultValue": null
979
+ }
980
+ ],
981
+ "fragmentRefs": [
982
+ "Location",
983
+ "PageInfo"
984
+ ],
985
+ "body": "query Locations($first: Int = 20, $after: String, $near: GeoCoordinateInput, $hasPickupEnabled: Boolean, $locationType: LocationType) {\n locations(\n first: $first\n after: $after\n near: $near\n hasPickupEnabled: $hasPickupEnabled\n locationType: $locationType\n ) {\n totalCount\n pageInfo {\n ...PageInfo\n }\n edges {\n cursor\n node {\n ...Location\n }\n }\n }\n}"
986
+ },
987
+ {
988
+ "name": "Location",
989
+ "kind": "query",
990
+ "section": "Locations (store picker UI)",
991
+ "description": "Fetches a single store location by `id` — full address, coordinates, business hours, pickup config (lead time, hours, timezone), and services. Returns null if the location is not found, not active, or owned by another shop. Use on the location detail page. Public; no auth required.",
992
+ "variables": [
993
+ {
994
+ "name": "id",
995
+ "type": "ID!",
996
+ "defaultValue": null
997
+ }
998
+ ],
999
+ "fragmentRefs": [
1000
+ "Location"
1001
+ ],
1002
+ "body": "query Location($id: ID!) {\n location(id: $id) {\n ...Location\n }\n}"
1003
+ }
1004
+ ],
1005
+ "mutations": [
1006
+ {
1007
+ "name": "CartCreate",
1008
+ "kind": "mutation",
1009
+ "section": "Cart Mutations",
1010
+ "description": "Creates a new cart and optionally pre-populates it with line items. Cart ID is a UUID stored by the SDK in the `cart-id` cookie (30-day TTL); the cart itself expires server-side after 72 hours of inactivity. The `warnings` field is reserved for non-blocking issues — current implementation returns it empty in this path.",
1011
+ "variables": [
1012
+ {
1013
+ "name": "input",
1014
+ "type": "CartCreateInput",
1015
+ "defaultValue": null
1016
+ }
1017
+ ],
1018
+ "fragmentRefs": [
1019
+ "Cart",
1020
+ "CartWarning",
1021
+ "UserError"
1022
+ ],
1023
+ "body": "mutation CartCreate($input: CartCreateInput) {\n cartCreate(input: $input) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1024
+ },
1025
+ {
1026
+ "name": "CartAddLines",
1027
+ "kind": "mutation",
1028
+ "section": "Cart Mutations",
1029
+ "description": "Adds line items to a cart. Each line is `{ merchandiseId, quantity, attributes?, attributeSelections? }`. If the same variant + identical attributes are added twice, quantities merge into one row instead of duplicating. Validates stock (`INSUFFICIENT_STOCK`) and configurator attributes (`ATTRIBUTE_REQUIRED`, `ATTRIBUTE_OPTION_INVALID`). Triggers cart re-pricing including discount recalculation.",
1030
+ "variables": [
1031
+ {
1032
+ "name": "id",
1033
+ "type": "ID!",
1034
+ "defaultValue": null
1035
+ },
1036
+ {
1037
+ "name": "lines",
1038
+ "type": "[CartLineInput!]!",
1039
+ "defaultValue": null
1040
+ }
1041
+ ],
1042
+ "fragmentRefs": [
1043
+ "Cart",
1044
+ "CartWarning",
1045
+ "UserError"
1046
+ ],
1047
+ "body": "mutation CartAddLines($id: ID!, $lines: [CartLineInput!]!) {\n cartAddLines(id: $id, lines: $lines) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1048
+ },
1049
+ {
1050
+ "name": "CartUpdateLines",
1051
+ "kind": "mutation",
1052
+ "section": "Cart Mutations",
1053
+ "description": "Updates quantity and/or attributes of existing cart lines by `id`. Setting `quantity: 0` auto-deletes the line. Passing `attributes: []` clears them; omitting the field preserves existing values. Re-validates stock and re-prices the cart after each update.",
1054
+ "variables": [
1055
+ {
1056
+ "name": "id",
1057
+ "type": "ID!",
1058
+ "defaultValue": null
1059
+ },
1060
+ {
1061
+ "name": "lines",
1062
+ "type": "[CartLineUpdateInput!]!",
1063
+ "defaultValue": null
1064
+ }
1065
+ ],
1066
+ "fragmentRefs": [
1067
+ "Cart",
1068
+ "CartWarning",
1069
+ "UserError"
1070
+ ],
1071
+ "body": "mutation CartUpdateLines($id: ID!, $lines: [CartLineUpdateInput!]!) {\n cartUpdateLines(id: $id, lines: $lines) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1072
+ },
1073
+ {
1074
+ "name": "CartRemoveLines",
1075
+ "kind": "mutation",
1076
+ "section": "Cart Mutations",
1077
+ "description": "Removes specific lines from cart by `lineIds[]`. Internally delegates to `cartUpdateLines` with `quantity: 0` — both endpoints are functionally equivalent; this one exists for API ergonomics when intent is explicit removal. Triggers cart re-pricing.",
1078
+ "variables": [
1079
+ {
1080
+ "name": "id",
1081
+ "type": "ID!",
1082
+ "defaultValue": null
1083
+ },
1084
+ {
1085
+ "name": "lineIds",
1086
+ "type": "[ID!]!",
1087
+ "defaultValue": null
1088
+ }
1089
+ ],
1090
+ "fragmentRefs": [
1091
+ "Cart",
1092
+ "CartWarning",
1093
+ "UserError"
1094
+ ],
1095
+ "body": "mutation CartRemoveLines($id: ID!, $lineIds: [ID!]!) {\n cartRemoveLines(id: $id, lineIds: $lineIds) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1096
+ },
1097
+ {
1098
+ "name": "CartApplyDiscountCodes",
1099
+ "kind": "mutation",
1100
+ "section": "Cart Mutations",
1101
+ "description": "Replaces (NOT appends) the cart's discount codes with the given list. Pass `[]` to clear all codes. Each code is validated against `discounts` table (existence, active status); invalid codes appear in `userErrors[]` as `DISCOUNT_CODE_INVALID`. Triggers cart re-pricing — discount allocations are recomputed and stored in `cart.discountAmount`.",
1102
+ "variables": [
1103
+ {
1104
+ "name": "id",
1105
+ "type": "ID!",
1106
+ "defaultValue": null
1107
+ },
1108
+ {
1109
+ "name": "discountCodes",
1110
+ "type": "[String!]!",
1111
+ "defaultValue": null
1112
+ }
1113
+ ],
1114
+ "fragmentRefs": [
1115
+ "Cart",
1116
+ "CartWarning",
1117
+ "UserError"
1118
+ ],
1119
+ "body": "mutation CartApplyDiscountCodes($id: ID!, $discountCodes: [String!]!) {\n cartApplyDiscountCodes(id: $id, discountCodes: $discountCodes) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1120
+ },
1121
+ {
1122
+ "name": "CartUpdateBuyerIdentity",
1123
+ "kind": "mutation",
1124
+ "section": "Cart Mutations",
1125
+ "description": "Associates a customer with the cart. Despite the input shape accepting `email`, `phone`, `countryCode`, `languageCode`, only `customerId` is currently persisted — other fields are silently ignored. Does NOT trigger tax / shipping recalculation; pure cart-to-customer linking. Use during login or guest-to-account upgrade.",
1126
+ "variables": [
1127
+ {
1128
+ "name": "id",
1129
+ "type": "ID!",
1130
+ "defaultValue": null
1131
+ },
1132
+ {
1133
+ "name": "buyerIdentity",
1134
+ "type": "CartBuyerIdentityInput!",
1135
+ "defaultValue": null
1136
+ }
1137
+ ],
1138
+ "fragmentRefs": [
1139
+ "Cart",
1140
+ "CartWarning",
1141
+ "UserError"
1142
+ ],
1143
+ "body": "mutation CartUpdateBuyerIdentity($id: ID!, $buyerIdentity: CartBuyerIdentityInput!) {\n cartUpdateBuyerIdentity(id: $id, buyerIdentity: $buyerIdentity) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1144
+ },
1145
+ {
1146
+ "name": "CartUpdateNote",
1147
+ "kind": "mutation",
1148
+ "section": "Cart Mutations",
1149
+ "description": "Sets a free-text note on the cart (gift message, special instructions). Pass empty string to clear. Stored on the `Cart` row, propagated to the `Order` at checkout completion, visible to merchant in admin.",
1150
+ "variables": [
1151
+ {
1152
+ "name": "id",
1153
+ "type": "ID!",
1154
+ "defaultValue": null
1155
+ },
1156
+ {
1157
+ "name": "note",
1158
+ "type": "String!",
1159
+ "defaultValue": null
1160
+ }
1161
+ ],
1162
+ "fragmentRefs": [
1163
+ "Cart",
1164
+ "CartWarning",
1165
+ "UserError"
1166
+ ],
1167
+ "body": "mutation CartUpdateNote($id: ID!, $note: String!) {\n cartUpdateNote(id: $id, note: $note) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1168
+ },
1169
+ {
1170
+ "name": "CustomerSignup",
1171
+ "kind": "mutation",
1172
+ "section": "Customer Auth Mutations",
1173
+ "description": "Registers a new customer. Returns `customerAccessToken` immediately — the customer record is created with status `ACTIVE` (no pending state). The activation email containing `customerActivate` token is sent for `emailVerified=true` confirmation, but is NOT required for login. Cookie: `customerAccessToken`, 30-day max-age, httpOnly. JWT TTL: 24h. Bot-protection guarded.",
1174
+ "variables": [
1175
+ {
1176
+ "name": "input",
1177
+ "type": "CustomerCreateInput!",
1178
+ "defaultValue": null
1179
+ }
1180
+ ],
1181
+ "fragmentRefs": [
1182
+ "Customer",
1183
+ "CustomerAccessToken",
1184
+ "UserError"
1185
+ ],
1186
+ "body": "mutation CustomerSignup($input: CustomerCreateInput!) {\n customerSignup(input: $input) {\n customer {\n ...Customer\n }\n customerAccessToken {\n ...CustomerAccessToken\n }\n userErrors {\n ...UserError\n }\n }\n}"
1187
+ },
1188
+ {
1189
+ "name": "CustomerLogin",
1190
+ "kind": "mutation",
1191
+ "section": "Customer Auth Mutations",
1192
+ "description": "Logs in with email + password. JWT lifetime 24h; cookie max-age 30d (cookie outlives JWT — call `customerRefreshToken` before JWT expiry to extend session). Brute-force protected: 10 failed attempts per email = 15-min Redis-backed lockout. Failed attempts are recorded for non-existent emails too (timing-attack safe).",
1193
+ "variables": [
1194
+ {
1195
+ "name": "input",
1196
+ "type": "CustomerAccessTokenCreateInput!",
1197
+ "defaultValue": null
1198
+ }
1199
+ ],
1200
+ "fragmentRefs": [
1201
+ "CustomerAccessToken",
1202
+ "UserError"
1203
+ ],
1204
+ "body": "mutation CustomerLogin($input: CustomerAccessTokenCreateInput!) {\n customerLogin(input: $input) {\n customerAccessToken {\n ...CustomerAccessToken\n }\n userErrors {\n ...UserError\n }\n }\n}"
1205
+ },
1206
+ {
1207
+ "name": "CustomerLogout",
1208
+ "kind": "mutation",
1209
+ "section": "Customer Auth Mutations",
1210
+ "description": "Clears the `customerAccessToken` cookie. Note: the JWT itself is NOT server-side invalidated — it remains valid until its 24h expiry. Server-side token revocation is on the roadmap. Idempotent.",
1211
+ "variables": [],
1212
+ "fragmentRefs": [
1213
+ "UserError"
1214
+ ],
1215
+ "body": "mutation CustomerLogout {\n customerLogout {\n deletedAccessToken\n deletedCustomerAccessTokenId\n userErrors {\n ...UserError\n }\n }\n}"
1216
+ },
1217
+ {
1218
+ "name": "CustomerRefreshToken",
1219
+ "kind": "mutation",
1220
+ "section": "Customer Auth Mutations",
1221
+ "description": "Issues a fresh JWT (24h TTL) for the currently-authenticated customer. Reads identity from the current cookie/Bearer token; takes no input. Use proactively before JWT expiry or reactively on a 401 retry. The new token replaces the cookie value.",
1222
+ "variables": [],
1223
+ "fragmentRefs": [
1224
+ "CustomerAccessToken",
1225
+ "UserError"
1226
+ ],
1227
+ "body": "mutation CustomerRefreshToken {\n customerRefreshToken {\n customerAccessToken {\n ...CustomerAccessToken\n }\n userErrors {\n ...UserError\n }\n }\n}"
1228
+ },
1229
+ {
1230
+ "name": "CustomerUpdate",
1231
+ "kind": "mutation",
1232
+ "section": "Customer Profile Mutations",
1233
+ "description": "Updates the logged-in customer's profile. Supported fields include `firstName`, `lastName`, `phone`, marketing preferences, and B2B identity (`customerType`, `companyName`, `taxId`, `vatNumber`, `regon`). Concurrent updates from the storefront and the merchant admin are reconciled safely — the loser of a race retries against the latest version. Marketing consent changes are recorded separately for audit purposes.",
1234
+ "variables": [
1235
+ {
1236
+ "name": "customer",
1237
+ "type": "CustomerUpdateInput!",
1238
+ "defaultValue": null
1239
+ }
1240
+ ],
1241
+ "fragmentRefs": [
1242
+ "Customer",
1243
+ "UserError"
1244
+ ],
1245
+ "body": "mutation CustomerUpdate($customer: CustomerUpdateInput!) {\n customerUpdate(customer: $customer) {\n customer {\n ...Customer\n }\n userErrors {\n ...UserError\n }\n }\n}"
1246
+ },
1247
+ {
1248
+ "name": "CustomerAddAddress",
1249
+ "kind": "mutation",
1250
+ "section": "Customer Address Mutations",
1251
+ "description": "Adds a new mailing address. If `isDefaultShipping` or `isDefaultBilling` is `true` in the input, the new address is set as default and any other address for this customer holding that flag is atomically cleared in the same transaction.",
1252
+ "variables": [
1253
+ {
1254
+ "name": "address",
1255
+ "type": "MailingAddressInput!",
1256
+ "defaultValue": null
1257
+ }
1258
+ ],
1259
+ "fragmentRefs": [
1260
+ "MailingAddress",
1261
+ "UserError"
1262
+ ],
1263
+ "body": "mutation CustomerAddAddress($address: MailingAddressInput!) {\n customerAddAddress(address: $address) {\n address {\n ...MailingAddress\n }\n userErrors {\n ...UserError\n }\n }\n}"
1264
+ },
1265
+ {
1266
+ "name": "CustomerUpdateAddress",
1267
+ "kind": "mutation",
1268
+ "section": "Customer Address Mutations",
1269
+ "description": "Updates an existing address owned by the logged-in customer. If `isDefaultShipping` or `isDefaultBilling` toggles to `true`, default flag is atomically cleared on all other addresses for this customer.",
1270
+ "variables": [
1271
+ {
1272
+ "name": "id",
1273
+ "type": "ID!",
1274
+ "defaultValue": null
1275
+ },
1276
+ {
1277
+ "name": "address",
1278
+ "type": "MailingAddressInput!",
1279
+ "defaultValue": null
1280
+ }
1281
+ ],
1282
+ "fragmentRefs": [
1283
+ "MailingAddress",
1284
+ "UserError"
1285
+ ],
1286
+ "body": "mutation CustomerUpdateAddress($id: ID!, $address: MailingAddressInput!) {\n customerUpdateAddress(id: $id, address: $address) {\n address {\n ...MailingAddress\n }\n userErrors {\n ...UserError\n }\n }\n}"
1287
+ },
1288
+ {
1289
+ "name": "CustomerRemoveAddress",
1290
+ "kind": "mutation",
1291
+ "section": "Customer Address Mutations",
1292
+ "description": "Hard-deletes an address row from `customer_addresses`. Historical orders that referenced this address are unaffected (address is snapshotted into the order at checkout completion).",
1293
+ "variables": [
1294
+ {
1295
+ "name": "id",
1296
+ "type": "ID!",
1297
+ "defaultValue": null
1298
+ }
1299
+ ],
1300
+ "fragmentRefs": [
1301
+ "UserError"
1302
+ ],
1303
+ "body": "mutation CustomerRemoveAddress($id: ID!) {\n customerRemoveAddress(id: $id) {\n deletedAddressId\n userErrors {\n ...UserError\n }\n }\n}"
1304
+ },
1305
+ {
1306
+ "name": "CustomerSetDefaultAddress",
1307
+ "kind": "mutation",
1308
+ "section": "Customer Address Mutations",
1309
+ "description": "Marks the given address as the customer's default **shipping** address. Atomically clears the shipping-default flag from all other addresses. Note: there is no separate setter for default billing — set `isDefaultBilling: true` via `customerAddAddress` / `customerUpdateAddress` instead.",
1310
+ "variables": [
1311
+ {
1312
+ "name": "addressId",
1313
+ "type": "ID!",
1314
+ "defaultValue": null
1315
+ }
1316
+ ],
1317
+ "fragmentRefs": [
1318
+ "Customer",
1319
+ "UserError"
1320
+ ],
1321
+ "body": "mutation CustomerSetDefaultAddress($addressId: ID!) {\n customerSetDefaultAddress(addressId: $addressId) {\n customer {\n ...Customer\n }\n userErrors {\n ...UserError\n }\n }\n}"
1322
+ },
1323
+ {
1324
+ "name": "CustomerRequestPasswordReset",
1325
+ "kind": "mutation",
1326
+ "section": "Customer Password Mutations",
1327
+ "description": "Sends a password reset email. Always returns success regardless of whether the email exists (no account enumeration). The email is dispatched asynchronously, so a small delay between request and inbox arrival is normal. Rate-limited to 3 requests per 10 minutes.",
1328
+ "variables": [
1329
+ {
1330
+ "name": "email",
1331
+ "type": "String!",
1332
+ "defaultValue": null
1333
+ }
1334
+ ],
1335
+ "fragmentRefs": [
1336
+ "UserError"
1337
+ ],
1338
+ "body": "mutation CustomerRequestPasswordReset($email: String!) {\n customerRequestPasswordReset(email: $email) {\n userErrors {\n ...UserError\n }\n }\n}"
1339
+ },
1340
+ {
1341
+ "name": "CustomerActivate",
1342
+ "kind": "mutation",
1343
+ "section": "Customer Password Mutations",
1344
+ "description": "Activates a newly-created account using the 64-hex activation token from the welcome email + a chosen password. Token TTL is 24h, single-use (atomically marked `used_at`). On success: sets `email_verified=true`, transitions status `INACTIVE`→`ACTIVE`, returns a fresh JWT for auto-login. Rate-limited.",
1345
+ "variables": [
1346
+ {
1347
+ "name": "token",
1348
+ "type": "String!",
1349
+ "defaultValue": null
1350
+ },
1351
+ {
1352
+ "name": "password",
1353
+ "type": "String!",
1354
+ "defaultValue": null
1355
+ }
1356
+ ],
1357
+ "fragmentRefs": [
1358
+ "Customer",
1359
+ "CustomerAccessToken",
1360
+ "UserError"
1361
+ ],
1362
+ "body": "mutation CustomerActivate($token: String!, $password: String!) {\n customerActivate(token: $token, password: $password) {\n customer {\n ...Customer\n }\n customerAccessToken {\n ...CustomerAccessToken\n }\n userErrors {\n ...UserError\n }\n }\n}"
1363
+ },
1364
+ {
1365
+ "name": "CustomerResetPassword",
1366
+ "kind": "mutation",
1367
+ "section": "Customer Password Mutations",
1368
+ "description": "Resets the password using the 64-hex reset token from the password-reset email. Token TTL is 1h, single-use (atomically marked `used_at`). On success: updates the password hash and returns a fresh JWT for auto-login (no second login step needed). Rate-limited.",
1369
+ "variables": [
1370
+ {
1371
+ "name": "token",
1372
+ "type": "String!",
1373
+ "defaultValue": null
1374
+ },
1375
+ {
1376
+ "name": "newPassword",
1377
+ "type": "String!",
1378
+ "defaultValue": null
1379
+ }
1380
+ ],
1381
+ "fragmentRefs": [
1382
+ "Customer",
1383
+ "CustomerAccessToken",
1384
+ "UserError"
1385
+ ],
1386
+ "body": "mutation CustomerResetPassword($token: String!, $newPassword: String!) {\n customerResetPassword(token: $token, newPassword: $newPassword) {\n customer {\n ...Customer\n }\n customerAccessToken {\n ...CustomerAccessToken\n }\n userErrors {\n ...UserError\n }\n }\n}"
1387
+ },
1388
+ {
1389
+ "name": "CheckoutCreate",
1390
+ "kind": "mutation",
1391
+ "section": "Checkout Mutations",
1392
+ "description": "Creates a new checkout session for the given cart (or a fresh cart if `cartId` is omitted). Inherits applied discounts and gift cards from the cart by reference (not snapshot). Errors: `CART_NOT_FOUND`, `EMPTY_CART`, `ALREADY_COMPLETED` (cart already converted to order). NOT idempotent — multiple calls create multiple checkouts.",
1393
+ "variables": [
1394
+ {
1395
+ "name": "input",
1396
+ "type": "CheckoutCreateInput!",
1397
+ "defaultValue": null
1398
+ }
1399
+ ],
1400
+ "fragmentRefs": [
1401
+ "Checkout",
1402
+ "UserError"
1403
+ ],
1404
+ "body": "mutation CheckoutCreate($input: CheckoutCreateInput!) {\n checkoutCreate(input: $input) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1405
+ },
1406
+ {
1407
+ "name": "CheckoutShippingAddressUpdate",
1408
+ "kind": "mutation",
1409
+ "section": "Checkout Mutations",
1410
+ "description": "Sets the shipping address (full replace, not patch). Triggers cart re-pricing. Address format is NOT validated here — full validation runs at `checkoutComplete` (`validateOrderReadiness`).",
1411
+ "variables": [
1412
+ {
1413
+ "name": "checkoutId",
1414
+ "type": "ID!",
1415
+ "defaultValue": null
1416
+ },
1417
+ {
1418
+ "name": "shippingAddress",
1419
+ "type": "CheckoutAddressInput!",
1420
+ "defaultValue": null
1421
+ }
1422
+ ],
1423
+ "fragmentRefs": [
1424
+ "Checkout",
1425
+ "UserError"
1426
+ ],
1427
+ "body": "mutation CheckoutShippingAddressUpdate($checkoutId: ID!, $shippingAddress: CheckoutAddressInput!) {\n checkoutShippingAddressUpdate(\n checkoutId: $checkoutId\n shippingAddress: $shippingAddress\n ) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1428
+ },
1429
+ {
1430
+ "name": "CheckoutBillingAddressUpdate",
1431
+ "kind": "mutation",
1432
+ "section": "Checkout Mutations",
1433
+ "description": "Sets the billing address (full replace). Independent of shipping address — pass it explicitly even when \"billing same as shipping\".",
1434
+ "variables": [
1435
+ {
1436
+ "name": "checkoutId",
1437
+ "type": "ID!",
1438
+ "defaultValue": null
1439
+ },
1440
+ {
1441
+ "name": "billingAddress",
1442
+ "type": "CheckoutAddressInput!",
1443
+ "defaultValue": null
1444
+ }
1445
+ ],
1446
+ "fragmentRefs": [
1447
+ "Checkout",
1448
+ "UserError"
1449
+ ],
1450
+ "body": "mutation CheckoutBillingAddressUpdate($checkoutId: ID!, $billingAddress: CheckoutAddressInput!) {\n checkoutBillingAddressUpdate(\n checkoutId: $checkoutId\n billingAddress: $billingAddress\n ) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1451
+ },
1452
+ {
1453
+ "name": "CheckoutEmailUpdate",
1454
+ "kind": "mutation",
1455
+ "section": "Checkout Mutations",
1456
+ "description": "Sets or updates the contact email on the checkout (used for guest checkout, order confirmation, and tracking emails). Validated against a regex; returns `INVALID` for malformed format.",
1457
+ "variables": [
1458
+ {
1459
+ "name": "checkoutId",
1460
+ "type": "ID!",
1461
+ "defaultValue": null
1462
+ },
1463
+ {
1464
+ "name": "email",
1465
+ "type": "String!",
1466
+ "defaultValue": null
1467
+ }
1468
+ ],
1469
+ "fragmentRefs": [
1470
+ "Checkout",
1471
+ "UserError"
1472
+ ],
1473
+ "body": "mutation CheckoutEmailUpdate($checkoutId: ID!, $email: String!) {\n checkoutEmailUpdate(checkoutId: $checkoutId, email: $email) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1474
+ },
1475
+ {
1476
+ "name": "CheckoutShippingLineUpdate",
1477
+ "kind": "mutation",
1478
+ "section": "Checkout Mutations",
1479
+ "description": "Selects a shipping method by `shippingRateHandle` (a stable shipping-method UUID, NOT an opaque per-request token). The id comes from `availableShippingMethods` query, computed for the current address + cart subtotal at request time.",
1480
+ "variables": [
1481
+ {
1482
+ "name": "checkoutId",
1483
+ "type": "ID!",
1484
+ "defaultValue": null
1485
+ },
1486
+ {
1487
+ "name": "shippingRateHandle",
1488
+ "type": "String!",
1489
+ "defaultValue": null
1490
+ }
1491
+ ],
1492
+ "fragmentRefs": [
1493
+ "Checkout",
1494
+ "UserError"
1495
+ ],
1496
+ "body": "mutation CheckoutShippingLineUpdate($checkoutId: ID!, $shippingRateHandle: String!) {\n checkoutShippingLineUpdate(\n checkoutId: $checkoutId\n shippingRateHandle: $shippingRateHandle\n ) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1497
+ },
1498
+ {
1499
+ "name": "CheckoutDiscountCodeApply",
1500
+ "kind": "mutation",
1501
+ "section": "Checkout Mutations",
1502
+ "description": "Appends a discount code to the cart's `discount_codes` array. Note: while multiple codes can be stored, the pricing engine currently uses **only the first applied code** — codes do not stack. Validated for existence, active status, and customer usage limits via `discountService.validateDiscount`.",
1503
+ "variables": [
1504
+ {
1505
+ "name": "checkoutId",
1506
+ "type": "ID!",
1507
+ "defaultValue": null
1508
+ },
1509
+ {
1510
+ "name": "discountCode",
1511
+ "type": "String!",
1512
+ "defaultValue": null
1513
+ }
1514
+ ],
1515
+ "fragmentRefs": [
1516
+ "Checkout",
1517
+ "UserError"
1518
+ ],
1519
+ "body": "mutation CheckoutDiscountCodeApply($checkoutId: ID!, $discountCode: String!) {\n checkoutDiscountCodeApply(checkoutId: $checkoutId, discountCode: $discountCode) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1520
+ },
1521
+ {
1522
+ "name": "CheckoutDiscountCodeRemove",
1523
+ "kind": "mutation",
1524
+ "section": "Checkout Mutations",
1525
+ "description": "Removes a code from the cart's `discount_codes` array (filters by exact match). Triggers re-pricing.",
1526
+ "variables": [
1527
+ {
1528
+ "name": "checkoutId",
1529
+ "type": "ID!",
1530
+ "defaultValue": null
1531
+ },
1532
+ {
1533
+ "name": "discountCode",
1534
+ "type": "String!",
1535
+ "defaultValue": null
1536
+ }
1537
+ ],
1538
+ "fragmentRefs": [
1539
+ "Checkout",
1540
+ "UserError"
1541
+ ],
1542
+ "body": "mutation CheckoutDiscountCodeRemove($checkoutId: ID!, $discountCode: String!) {\n checkoutDiscountCodeRemove(checkoutId: $checkoutId, discountCode: $discountCode) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1543
+ },
1544
+ {
1545
+ "name": "CheckoutDiscountCodeValidate",
1546
+ "kind": "mutation",
1547
+ "section": "Checkout Mutations",
1548
+ "description": "READ-ONLY validation of a discount code against the current checkout — does NOT modify state. Returns `{ isValid, discount, error }` for previewing the effect (e.g. inline UI feedback as the user types).",
1549
+ "variables": [
1550
+ {
1551
+ "name": "checkoutId",
1552
+ "type": "ID!",
1553
+ "defaultValue": null
1554
+ },
1555
+ {
1556
+ "name": "discountCode",
1557
+ "type": "String!",
1558
+ "defaultValue": null
1559
+ }
1560
+ ],
1561
+ "fragmentRefs": [
1562
+ "UserError"
1563
+ ],
1564
+ "body": "mutation CheckoutDiscountCodeValidate($checkoutId: ID!, $discountCode: String!) {\n checkoutDiscountCodeValidate(\n checkoutId: $checkoutId\n discountCode: $discountCode\n ) {\n result {\n isValid\n discount {\n code\n title\n type\n value\n discountAmount {\n amount\n currencyCode\n }\n }\n error {\n code\n message\n }\n }\n userErrors {\n ...UserError\n }\n }\n}"
1565
+ },
1566
+ {
1567
+ "name": "CheckoutPaymentMethodUpdate",
1568
+ "kind": "mutation",
1569
+ "section": "Checkout Mutations",
1570
+ "description": "Selects a payment method by `paymentMethodId` (UUID from `availablePaymentMethods` query). Validates existence and active status; no pre-authorization is performed here.",
1571
+ "variables": [
1572
+ {
1573
+ "name": "checkoutId",
1574
+ "type": "ID!",
1575
+ "defaultValue": null
1576
+ },
1577
+ {
1578
+ "name": "paymentMethodId",
1579
+ "type": "ID!",
1580
+ "defaultValue": null
1581
+ }
1582
+ ],
1583
+ "fragmentRefs": [
1584
+ "Checkout",
1585
+ "UserError"
1586
+ ],
1587
+ "body": "mutation CheckoutPaymentMethodUpdate($checkoutId: ID!, $paymentMethodId: ID!) {\n checkoutPaymentMethodUpdate(\n checkoutId: $checkoutId\n paymentMethodId: $paymentMethodId\n ) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1588
+ },
1589
+ {
1590
+ "name": "CheckoutComplete",
1591
+ "kind": "mutation",
1592
+ "section": "Checkout Mutations",
1593
+ "description": "Finalizes the checkout: creates the `Order`, marks the cart `CONVERTED`, deducts gift cards, emits `ORDER_CREATED` (and `ORDER_CONFIRMED` for COD) — all in a single serializable transaction. **Idempotent on `idempotencyKey`** (NOT on `checkoutId`); auto-generated from `cartId + timestamp` if the caller omits it. The `paymentUrl` field is reserved but is NOT populated here — for hosted gateways (PayU, P24) the storefront calls a separate `paymentCreate` mutation after this returns.",
1594
+ "variables": [
1595
+ {
1596
+ "name": "checkoutId",
1597
+ "type": "ID!",
1598
+ "defaultValue": null
1599
+ },
1600
+ {
1601
+ "name": "input",
1602
+ "type": "CheckoutCompleteInput",
1603
+ "defaultValue": null
1604
+ }
1605
+ ],
1606
+ "fragmentRefs": [
1607
+ "Checkout",
1608
+ "Order",
1609
+ "UserError"
1610
+ ],
1611
+ "body": "mutation CheckoutComplete($checkoutId: ID!, $input: CheckoutCompleteInput) {\n checkoutComplete(checkoutId: $checkoutId, input: $input) {\n checkout {\n ...Checkout\n }\n order {\n ...Order\n }\n paymentUrl\n userErrors {\n ...UserError\n }\n }\n}"
1612
+ },
1613
+ {
1614
+ "name": "CheckoutGiftCardApply",
1615
+ "kind": "mutation",
1616
+ "section": "Gift Card Checkout Mutations",
1617
+ "description": "Applies a gift card to the cart, stackable with discount codes. Consumption is FIFO: each card consumes `min(remainingBalance, paymentDue)` against the current cart total in the order they were applied. The gift card balance is NOT debited yet — actual deduction happens atomically inside the `checkoutComplete` transaction. Errors: `GIFT_CARD_NOT_FOUND`, `GIFT_CARD_DEPLETED`, `GIFT_CARD_UNUSABLE`, `GIFT_CARD_ALREADY_APPLIED`.",
1618
+ "variables": [
1619
+ {
1620
+ "name": "checkoutId",
1621
+ "type": "ID!",
1622
+ "defaultValue": null
1623
+ },
1624
+ {
1625
+ "name": "giftCardCode",
1626
+ "type": "String!",
1627
+ "defaultValue": null
1628
+ }
1629
+ ],
1630
+ "fragmentRefs": [
1631
+ "Checkout",
1632
+ "UserError"
1633
+ ],
1634
+ "body": "mutation CheckoutGiftCardApply($checkoutId: ID!, $giftCardCode: String!) {\n checkoutGiftCardApply(checkoutId: $checkoutId, giftCardCode: $giftCardCode) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1635
+ },
1636
+ {
1637
+ "name": "CheckoutGiftCardRemove",
1638
+ "kind": "mutation",
1639
+ "section": "Gift Card Checkout Mutations",
1640
+ "description": "Removes a gift card from the applied list and recalculates FIFO `appliedAmount` for the remaining cards. Since gift card balances are only debited at `checkoutComplete`, removing before completion has no effect on the underlying gift card balance.",
1641
+ "variables": [
1642
+ {
1643
+ "name": "checkoutId",
1644
+ "type": "ID!",
1645
+ "defaultValue": null
1646
+ },
1647
+ {
1648
+ "name": "giftCardCode",
1649
+ "type": "String!",
1650
+ "defaultValue": null
1651
+ }
1652
+ ],
1653
+ "fragmentRefs": [
1654
+ "Checkout",
1655
+ "UserError"
1656
+ ],
1657
+ "body": "mutation CheckoutGiftCardRemove($checkoutId: ID!, $giftCardCode: String!) {\n checkoutGiftCardRemove(checkoutId: $checkoutId, giftCardCode: $giftCardCode) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1658
+ },
1659
+ {
1660
+ "name": "CheckoutGiftCardRecipientUpdate",
1661
+ "kind": "mutation",
1662
+ "section": "Gift Card Checkout Mutations",
1663
+ "description": "Sets per-line-item recipient details (name, email, message, delivery date) for digital gift card products in the cart (variants with `type: GIFT_CARD`). Required before `checkoutComplete` for any line item with a gift-card variant. Recipient details are associated with each gift-card line item and propagated to the resulting order.",
1664
+ "variables": [
1665
+ {
1666
+ "name": "input",
1667
+ "type": "CheckoutGiftCardRecipientInput!",
1668
+ "defaultValue": null
1669
+ }
1670
+ ],
1671
+ "fragmentRefs": [
1672
+ "Checkout",
1673
+ "UserError"
1674
+ ],
1675
+ "body": "mutation CheckoutGiftCardRecipientUpdate($input: CheckoutGiftCardRecipientInput!) {\n checkoutGiftCardRecipientUpdate(input: $input) {\n checkout {\n ...Checkout\n }\n userErrors {\n ...UserError\n }\n }\n}"
1676
+ },
1677
+ {
1678
+ "name": "ReturnCreate",
1679
+ "kind": "mutation",
1680
+ "section": "Return Mutations",
1681
+ "description": "Creates an RMA in `REQUESTED` status (awaits merchant approval — NOT auto-approved). Input: `orderId`, `reason`, `items[{ variantId, quantity, reason, condition }]`, optional `compensationType` (REFUND or STORE_CREDIT) and `customerNote`. Validates the order's `fulfillmentStatus` permits returns and that requested quantities don't exceed already-shipped/unreturned quantities. Supports optional `idempotencyKey` for retry-safe creation.",
1682
+ "variables": [
1683
+ {
1684
+ "name": "input",
1685
+ "type": "ReturnCreateInput!",
1686
+ "defaultValue": null
1687
+ }
1688
+ ],
1689
+ "fragmentRefs": [
1690
+ "Return",
1691
+ "UserError"
1692
+ ],
1693
+ "body": "mutation ReturnCreate($input: ReturnCreateInput!) {\n returnCreate(input: $input) {\n return {\n ...Return\n }\n userErrors {\n ...UserError\n }\n }\n}"
1694
+ },
1695
+ {
1696
+ "name": "ReturnCancel",
1697
+ "kind": "mutation",
1698
+ "section": "Return Mutations",
1699
+ "description": "Cancels a return that is currently in `REQUESTED`, `APPROVED`, or `DRAFT` status (cancellation is allowed even AFTER merchant approval, as long as the return shipment hasn't been processed). Sets `cancelled_at` timestamp. Customer can only cancel returns they own.",
1700
+ "variables": [
1701
+ {
1702
+ "name": "id",
1703
+ "type": "ID!",
1704
+ "defaultValue": null
1705
+ }
1706
+ ],
1707
+ "fragmentRefs": [
1708
+ "Return",
1709
+ "UserError"
1710
+ ],
1711
+ "body": "mutation ReturnCancel($id: ID!) {\n returnCancel(id: $id) {\n return {\n ...Return\n }\n userErrors {\n ...UserError\n }\n }\n}"
1712
+ },
1713
+ {
1714
+ "name": "RedeemLoyaltyReward",
1715
+ "kind": "mutation",
1716
+ "section": "Loyalty Program Mutations",
1717
+ "description": "Redeems a loyalty reward by `rewardId`. Three reward types are supported, distinguished by which output field is populated: `discountCode` (issues a `LOYALTY-XXXX` code with 30-day expiry), `productDiscountCode` (issues a single-use 100%-off code for a specific product), or `giftCardCode` (creates a new gift card for the customer). Points are deducted atomically inside a transaction — if external creation (e.g. gift card service) fails after deduction, points are reversed.",
1718
+ "variables": [
1719
+ {
1720
+ "name": "input",
1721
+ "type": "RedeemRewardInput!",
1722
+ "defaultValue": null
1723
+ }
1724
+ ],
1725
+ "fragmentRefs": [
1726
+ "RedeemRewardPayload"
1727
+ ],
1728
+ "body": "mutation RedeemLoyaltyReward($input: RedeemRewardInput!) {\n redeemLoyaltyReward(input: $input) {\n ...RedeemRewardPayload\n }\n}"
1729
+ },
1730
+ {
1731
+ "name": "GenerateReferralCode",
1732
+ "kind": "mutation",
1733
+ "section": "Loyalty Program Mutations",
1734
+ "description": "Returns the customer's referral code, generating one on first call. Idempotent UPSERT — subsequent calls return the existing code from `customers.referral_code`. Format: `REF-XXXXXXXX` (8 random alphanumeric chars). Output also includes a `shareUrl` built from the shop's domain.",
1735
+ "variables": [],
1736
+ "fragmentRefs": [
1737
+ "GenerateReferralCodePayload"
1738
+ ],
1739
+ "body": "mutation GenerateReferralCode {\n generateReferralCode {\n ...GenerateReferralCodePayload\n }\n}"
1740
+ },
1741
+ {
1742
+ "name": "ReviewCreate",
1743
+ "kind": "mutation",
1744
+ "section": "Review Mutations",
1745
+ "description": "Submits a product review (rating 1-5, content 10-5000 chars, sanitized via `sanitizePlainText`). Default state is `PENDING` — review is hidden from public until merchant approves. If the input includes `orderId`, `isVerifiedPurchase` is auto-set to `true`. Bot-protected and rate-limited (10/min by default).",
1746
+ "variables": [
1747
+ {
1748
+ "name": "input",
1749
+ "type": "ReviewCreateInput!",
1750
+ "defaultValue": null
1751
+ }
1752
+ ],
1753
+ "fragmentRefs": [
1754
+ "ProductReview",
1755
+ "UserError"
1756
+ ],
1757
+ "body": "mutation ReviewCreate($input: ReviewCreateInput!) {\n reviewCreate(input: $input) {\n review {\n ...ProductReview\n }\n userErrors {\n ...UserError\n }\n }\n}"
1758
+ },
1759
+ {
1760
+ "name": "ReviewUpvote",
1761
+ "kind": "mutation",
1762
+ "section": "Review Mutations",
1763
+ "description": "Records an upvote (helpful) on a review. UPSERT semantics — one `ReviewVote` row per `(reviewId, customerId)`. Calling upvote twice is a no-op; calling downvote afterwards replaces the vote. Increments `helpful_count` on the review (and decrements `unhelpful_count` if replacing a downvote).",
1764
+ "variables": [
1765
+ {
1766
+ "name": "reviewId",
1767
+ "type": "ID!",
1768
+ "defaultValue": null
1769
+ }
1770
+ ],
1771
+ "fragmentRefs": [
1772
+ "ProductReview",
1773
+ "UserError"
1774
+ ],
1775
+ "body": "mutation ReviewUpvote($reviewId: ID!) {\n reviewUpvote(reviewId: $reviewId) {\n review {\n ...ProductReview\n }\n userErrors {\n ...UserError\n }\n }\n}"
1776
+ },
1777
+ {
1778
+ "name": "ReviewDownvote",
1779
+ "kind": "mutation",
1780
+ "section": "Review Mutations",
1781
+ "description": "Records a downvote (unhelpful) on a review. Same UPSERT semantics as `reviewUpvote` — one vote row per `(reviewId, customerId)`, replacing any prior vote. Increments `unhelpful_count`.",
1782
+ "variables": [
1783
+ {
1784
+ "name": "reviewId",
1785
+ "type": "ID!",
1786
+ "defaultValue": null
1787
+ }
1788
+ ],
1789
+ "fragmentRefs": [
1790
+ "ProductReview",
1791
+ "UserError"
1792
+ ],
1793
+ "body": "mutation ReviewDownvote($reviewId: ID!) {\n reviewDownvote(reviewId: $reviewId) {\n review {\n ...ProductReview\n }\n userErrors {\n ...UserError\n }\n }\n}"
1794
+ },
1795
+ {
1796
+ "name": "WishlistCreate",
1797
+ "kind": "mutation",
1798
+ "section": "Wishlist Mutations",
1799
+ "description": "Creates a new wishlist for the logged-in customer. `name` is optional (defaults to \"My Wishlist\"); name uniqueness is NOT enforced — customers can have multiple lists with the same name. Setting `isPublic: true` generates a 16-byte hex `shareToken` for public sharing.",
1800
+ "variables": [
1801
+ {
1802
+ "name": "input",
1803
+ "type": "WishlistCreateInput!",
1804
+ "defaultValue": null
1805
+ }
1806
+ ],
1807
+ "fragmentRefs": [
1808
+ "Wishlist"
1809
+ ],
1810
+ "body": "mutation WishlistCreate($input: WishlistCreateInput!) {\n wishlistCreate(input: $input) {\n wishlist {\n ...Wishlist\n }\n userErrors\n }\n}"
1811
+ },
1812
+ {
1813
+ "name": "WishlistAddItem",
1814
+ "kind": "mutation",
1815
+ "section": "Wishlist Mutations",
1816
+ "description": "Adds an item by `productId` (and optional `variantId`) to a wishlist. Idempotent on the `(wishlist_id, product_id, variant_id)` unique constraint — adding an already-present item is a silent no-op (`ON CONFLICT DO NOTHING`). Captures `priceAtAdd` for price-drop notifications.",
1817
+ "variables": [
1818
+ {
1819
+ "name": "wishlistId",
1820
+ "type": "ID!",
1821
+ "defaultValue": null
1822
+ },
1823
+ {
1824
+ "name": "input",
1825
+ "type": "WishlistItemInput!",
1826
+ "defaultValue": null
1827
+ }
1828
+ ],
1829
+ "fragmentRefs": [
1830
+ "Wishlist"
1831
+ ],
1832
+ "body": "mutation WishlistAddItem($wishlistId: ID!, $input: WishlistItemInput!) {\n wishlistAddItem(wishlistId: $wishlistId, input: $input) {\n wishlist {\n ...Wishlist\n }\n userErrors\n }\n}"
1833
+ },
1834
+ {
1835
+ "name": "WishlistRemoveItem",
1836
+ "kind": "mutation",
1837
+ "section": "Wishlist Mutations",
1838
+ "description": "Hard-deletes a wishlist item by `itemId` (the `WishlistItem` row id, NOT the product id).",
1839
+ "variables": [
1840
+ {
1841
+ "name": "wishlistId",
1842
+ "type": "ID!",
1843
+ "defaultValue": null
1844
+ },
1845
+ {
1846
+ "name": "itemId",
1847
+ "type": "ID!",
1848
+ "defaultValue": null
1849
+ }
1850
+ ],
1851
+ "fragmentRefs": [
1852
+ "Wishlist"
1853
+ ],
1854
+ "body": "mutation WishlistRemoveItem($wishlistId: ID!, $itemId: ID!) {\n wishlistRemoveItem(wishlistId: $wishlistId, itemId: $itemId) {\n wishlist {\n ...Wishlist\n }\n userErrors\n }\n}"
1855
+ },
1856
+ {
1857
+ "name": "WishlistDelete",
1858
+ "kind": "mutation",
1859
+ "section": "Wishlist Mutations",
1860
+ "description": "Hard-deletes the wishlist row. All `WishlistItem` rows are removed via FK cascade. No soft-delete; cannot be undone.",
1861
+ "variables": [
1862
+ {
1863
+ "name": "wishlistId",
1864
+ "type": "ID!",
1865
+ "defaultValue": null
1866
+ }
1867
+ ],
1868
+ "fragmentRefs": [
1869
+ "Wishlist"
1870
+ ],
1871
+ "body": "mutation WishlistDelete($wishlistId: ID!) {\n wishlistDelete(wishlistId: $wishlistId) {\n wishlist {\n ...Wishlist\n }\n userErrors\n }\n}"
1872
+ },
1873
+ {
1874
+ "name": "CartUpdateAttributes",
1875
+ "kind": "mutation",
1876
+ "section": "Cart Attributes",
1877
+ "description": "Replaces (NOT merges) the cart's custom attributes — free-form `[{ key, value }]` pairs visible to merchant in admin. Use for delivery instructions, gift wrap flags, B2B PO numbers, etc. Limit: 250 pairs per cart (returns `CART_ATTRIBUTES_LIMIT_EXCEEDED`); each `key` max 255 chars.",
1878
+ "variables": [
1879
+ {
1880
+ "name": "id",
1881
+ "type": "ID!",
1882
+ "defaultValue": null
1883
+ },
1884
+ {
1885
+ "name": "attributes",
1886
+ "type": "[CartAttributeInput!]!",
1887
+ "defaultValue": null
1888
+ }
1889
+ ],
1890
+ "fragmentRefs": [
1891
+ "Cart",
1892
+ "CartWarning",
1893
+ "UserError"
1894
+ ],
1895
+ "body": "mutation CartUpdateAttributes($id: ID!, $attributes: [CartAttributeInput!]!) {\n cartUpdateAttributes(id: $id, attributes: $attributes) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1896
+ }
1897
+ ],
1898
+ "fragments": [
1899
+ {
1900
+ "name": "PageInfo",
1901
+ "kind": "fragment",
1902
+ "section": "Common",
1903
+ "description": "Standard Relay Connection page metadata. Spread on every paginated query's `pageInfo`.",
1904
+ "variables": [],
1905
+ "fragmentRefs": [],
1906
+ "body": "fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n}",
1907
+ "onType": "PageInfo"
1908
+ },
1909
+ {
1910
+ "name": "UserError",
1911
+ "kind": "fragment",
1912
+ "section": "Common",
1913
+ "description": "Generic mutation error envelope — included in every mutation's `userErrors[]` field. Always check before consuming the happy-path payload.",
1914
+ "variables": [],
1915
+ "fragmentRefs": [],
1916
+ "body": "fragment UserError on UserError {\n message\n code\n field\n}",
1917
+ "onType": "UserError"
1918
+ },
1919
+ {
1920
+ "name": "CartWarning",
1921
+ "kind": "fragment",
1922
+ "section": "Common",
1923
+ "description": "Non-blocking cart warning (e.g. low stock, partial availability). Cart mutations succeed but surface these for UI hints.",
1924
+ "variables": [],
1925
+ "fragmentRefs": [],
1926
+ "body": "fragment CartWarning on CartWarning {\n message\n code\n target\n}",
1927
+ "onType": "CartWarning"
1928
+ },
1929
+ {
1930
+ "name": "Image",
1931
+ "kind": "fragment",
1932
+ "section": "Common",
1933
+ "description": "Base image — original size, no transform. Use for logos, favicons, branding assets that are already sized correctly. ~few KB.",
1934
+ "variables": [],
1935
+ "fragmentRefs": [],
1936
+ "body": "fragment Image on Image {\n id\n url\n altText\n width\n height\n}",
1937
+ "onType": "Image"
1938
+ },
1939
+ {
1940
+ "name": "ImageThumbnail",
1941
+ "kind": "fragment",
1942
+ "section": "Common",
1943
+ "description": "Thumbnail — cart line items, variant swatches, author avatars (rendered ~96px on screen, transform delivers up to 300px for 3x DPI). Includes `thumbhash` for blurred placeholder. Format auto-negotiated from the `Accept` header.",
1944
+ "variables": [],
1945
+ "fragmentRefs": [],
1946
+ "body": "fragment ImageThumbnail on Image {\n id\n url(transform: {maxWidth: 300})\n altText\n width\n height\n thumbhash\n}",
1947
+ "onType": "Image"
1948
+ },
1949
+ {
1950
+ "name": "ImageCard",
1951
+ "kind": "fragment",
1952
+ "section": "Common",
1953
+ "description": "Card — product cards, collection / category tiles, blog post previews (rendered ~400px, transform delivers up to 800px for 2x DPI). Includes `thumbhash` placeholder.",
1954
+ "variables": [],
1955
+ "fragmentRefs": [],
1956
+ "body": "fragment ImageCard on Image {\n id\n url(transform: {maxWidth: 800})\n altText\n width\n height\n thumbhash\n}",
1957
+ "onType": "Image"
1958
+ },
1959
+ {
1960
+ "name": "ImageFull",
1961
+ "kind": "fragment",
1962
+ "section": "Common",
1963
+ "description": "Full — product detail gallery, hero banners (rendered ~800px, transform delivers up to 1600px for 2x DPI). Includes `thumbhash` placeholder.",
1964
+ "variables": [],
1965
+ "fragmentRefs": [],
1966
+ "body": "fragment ImageFull on Image {\n id\n url(transform: {maxWidth: 1600})\n altText\n width\n height\n thumbhash\n}",
1967
+ "onType": "Image"
1968
+ },
1969
+ {
1970
+ "name": "Money",
1971
+ "kind": "fragment",
1972
+ "section": "Common",
1973
+ "description": "Plain `{ amount, currencyCode }` price. Use for `compareAtPrice`, totals, and any field where currency conversion transparency is not needed. `amount` is a String.",
1974
+ "variables": [],
1975
+ "fragmentRefs": [],
1976
+ "body": "fragment Money on Money {\n amount\n currencyCode\n}",
1977
+ "onType": "Money"
1978
+ },
1979
+ {
1980
+ "name": "Price",
1981
+ "kind": "fragment",
1982
+ "section": "Common",
1983
+ "description": "Lightweight price for listing views (cards, grids, search results) — same shape as `Money`. Spread when full conversion metadata is overkill.",
1984
+ "variables": [],
1985
+ "fragmentRefs": [],
1986
+ "body": "fragment Price on PriceMoney {\n amount\n currencyCode\n}",
1987
+ "onType": "PriceMoney"
1988
+ },
1989
+ {
1990
+ "name": "PriceMoney",
1991
+ "kind": "fragment",
1992
+ "section": "Common",
1993
+ "description": "Full price with currency-conversion transparency — adds `baseAmount`, `baseCurrencyCode`, `exchangeRate`, `marginApplied`, `rateTimestamp`, `isConverted`. Spread on PDP / cart / checkout where the customer needs to see the original price + applied conversion.",
1994
+ "variables": [],
1995
+ "fragmentRefs": [
1996
+ "Price"
1997
+ ],
1998
+ "body": "fragment PriceMoney on PriceMoney {\n ...Price\n baseAmount\n baseCurrencyCode\n exchangeRate\n marginApplied\n rateTimestamp\n isConverted\n}",
1999
+ "onType": "PriceMoney"
2000
+ },
2001
+ {
2002
+ "name": "SelectedOption",
2003
+ "kind": "fragment",
2004
+ "section": "Common",
2005
+ "description": "Selected variant option (e.g. `{ name: \"Color\", value: \"Red\" }`) on a `ProductVariant`. Use to render variant labels in cart / order summaries.",
2006
+ "variables": [],
2007
+ "fragmentRefs": [],
2008
+ "body": "fragment SelectedOption on SelectedOption {\n name\n value\n}",
2009
+ "onType": "SelectedOption"
2010
+ },
2011
+ {
2012
+ "name": "ProductVariant",
2013
+ "kind": "fragment",
2014
+ "section": "Products",
2015
+ "description": "Single variant of a product — price, compare-at, stock flags, sort, image, selected options. Spread on cart line items, PDP variant selectors, search result rows that need price.",
2016
+ "variables": [],
2017
+ "fragmentRefs": [
2018
+ "ImageThumbnail",
2019
+ "Money",
2020
+ "SelectedOption"
2021
+ ],
2022
+ "body": "fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price {\n ...Money\n }\n compareAtPrice {\n ...Money\n }\n isAvailable\n availableStock\n image {\n ...ImageThumbnail\n }\n selectedOptions {\n ...SelectedOption\n }\n barcode\n weight {\n value\n unit\n }\n sortOrder\n}",
2023
+ "onType": "ProductVariant"
2024
+ },
2025
+ {
2026
+ "name": "ProductCard",
2027
+ "kind": "fragment",
2028
+ "section": "Products",
2029
+ "description": "Minimal product shape for listing views (collection grids, search results, \"you may also like\"). Includes price range, featured image (card size), rating + review count, vendor, tags. Use for any list of products where you don't need variants/description.",
2030
+ "variables": [],
2031
+ "fragmentRefs": [
2032
+ "ImageCard",
2033
+ "Money"
2034
+ ],
2035
+ "body": "fragment ProductCard on Product {\n id\n handle\n title\n vendor\n category\n isAvailable\n averageRating\n reviewCount\n tags\n featuredImage {\n ...ImageCard\n }\n priceRange {\n minVariantPrice {\n ...Money\n }\n maxVariantPrice {\n ...Money\n }\n }\n compareAtPriceRange {\n minVariantPrice {\n ...Money\n }\n maxVariantPrice {\n ...Money\n }\n }\n}",
2036
+ "onType": "Product"
2037
+ },
2038
+ {
2039
+ "name": "ProductBase",
2040
+ "kind": "fragment",
2041
+ "section": "Products",
2042
+ "description": "`ProductCard` plus textual content (description, descriptionHtml), stock total, type, visibility flags, and timestamps. Use when you need full product copy but not the heavy variants/images lists. Sweet spot for blog post embeds, related-product cards with description.",
2043
+ "variables": [],
2044
+ "fragmentRefs": [
2045
+ "ProductCard"
2046
+ ],
2047
+ "body": "fragment ProductBase on Product {\n ...ProductCard\n description\n descriptionHtml\n stockTotal\n type\n requiresRecipientInfo\n visibility\n attributeSetId\n createdAt\n updatedAt\n}",
2048
+ "onType": "Product"
2049
+ },
2050
+ {
2051
+ "name": "ProductFull",
2052
+ "kind": "fragment",
2053
+ "section": "Products",
2054
+ "description": "Full product shape for the PDP — `ProductBase` plus the full image gallery (up to 20, full-size) and all variants (up to 100) with their pricing/stock. Spread on the product detail page.",
2055
+ "variables": [],
2056
+ "fragmentRefs": [
2057
+ "ImageFull",
2058
+ "PageInfo",
2059
+ "ProductBase",
2060
+ "ProductVariant"
2061
+ ],
2062
+ "body": "fragment ProductFull on Product {\n ...ProductBase\n images(first: 20) {\n edges {\n cursor\n node {\n ...ImageFull\n }\n }\n nodes {\n ...ImageFull\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n variants(first: 100) {\n edges {\n cursor\n node {\n ...ProductVariant\n }\n }\n nodes {\n ...ProductVariant\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n seo {\n title\n description\n }\n}",
2063
+ "onType": "Product"
2064
+ },
2065
+ {
2066
+ "name": "Collection",
2067
+ "kind": "fragment",
2068
+ "section": "Collections",
2069
+ "description": "Collection (manual or rule-based product grouping) — title, description, hero image, SEO. Spread on collection landing pages and collection cards. Does NOT include products — query `collection(id, handle).products` separately for those.",
2070
+ "variables": [],
2071
+ "fragmentRefs": [
2072
+ "ImageCard"
2073
+ ],
2074
+ "body": "fragment Collection on Collection {\n id\n handle\n title\n description\n descriptionHtml\n image {\n ...ImageCard\n }\n seo {\n title\n description\n }\n createdAt\n updatedAt\n}",
2075
+ "onType": "Collection"
2076
+ },
2077
+ {
2078
+ "name": "Category",
2079
+ "kind": "fragment",
2080
+ "section": "Categories",
2081
+ "description": "Category node in the shop's taxonomy — name, slug, hero image, depth `level`, materialized `path`, product count, sort order. Spread on category cards and breadcrumb segments. Does NOT include parent / children — query those fields separately and let the server batch them.",
2082
+ "variables": [],
2083
+ "fragmentRefs": [
2084
+ "ImageCard"
2085
+ ],
2086
+ "body": "fragment Category on Category {\n id\n name\n slug\n description\n image {\n ...ImageCard\n }\n level\n path\n productCount\n sortOrder\n}",
2087
+ "onType": "Category"
2088
+ },
2089
+ {
2090
+ "name": "MailingAddress",
2091
+ "kind": "fragment",
2092
+ "section": "Customer",
2093
+ "description": "Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Spread on the address book UI and order summaries.",
2094
+ "variables": [],
2095
+ "fragmentRefs": [],
2096
+ "body": "fragment MailingAddress on MailingAddress {\n id\n streetLine1\n streetLine2\n city\n company\n country\n countryCode\n firstName\n lastName\n phone\n state\n stateCode\n postalCode\n isDefault\n}",
2097
+ "onType": "MailingAddress"
2098
+ },
2099
+ {
2100
+ "name": "CustomerAccessToken",
2101
+ "kind": "fragment",
2102
+ "section": "Customer",
2103
+ "description": "Customer access token returned by `customerLogin` / `customerSignup` / `customerActivate` / `customerResetPassword` / `customerRefreshToken`. The token's JWT TTL is 24h; cookie max-age is 30d.",
2104
+ "variables": [],
2105
+ "fragmentRefs": [],
2106
+ "body": "fragment CustomerAccessToken on CustomerAccessToken {\n accessToken\n expiresAt\n}",
2107
+ "onType": "CustomerAccessToken"
2108
+ },
2109
+ {
2110
+ "name": "Customer",
2111
+ "kind": "fragment",
2112
+ "section": "Customer",
2113
+ "description": "Customer profile — basic info plus B2B fields (`taxId`, `vatNumber`, `regon`, `companyName`), default address, lifetime stats (`orderCount`, `totalSpent`), marketing preferences. Use on profile / settings pages.",
2114
+ "variables": [],
2115
+ "fragmentRefs": [
2116
+ "MailingAddress",
2117
+ "Money"
2118
+ ],
2119
+ "body": "fragment Customer on Customer {\n id\n email\n firstName\n lastName\n displayName\n phone\n isEmailVerified\n emailMarketing\n tags\n customerType\n companyName\n taxId\n vatNumber\n regon\n defaultAddress {\n ...MailingAddress\n }\n orderCount\n totalSpent {\n ...Money\n }\n createdAt\n updatedAt\n}",
2120
+ "onType": "Customer"
2121
+ },
2122
+ {
2123
+ "name": "Order",
2124
+ "kind": "fragment",
2125
+ "section": "Customer",
2126
+ "description": "Order summary — number, totals (cost / tax / shipping), payment + fulfillment status, shipping address, item count, lifecycle timestamps. Spread on the order list and order detail pages. Line items are not included here.",
2127
+ "variables": [],
2128
+ "fragmentRefs": [
2129
+ "MailingAddress",
2130
+ "Money"
2131
+ ],
2132
+ "body": "fragment Order on Order {\n id\n orderNumber\n totals {\n total {\n ...Money\n }\n subtotal {\n ...Money\n }\n totalTax {\n ...Money\n }\n totalShipping {\n ...Money\n }\n }\n status\n paymentStatus\n fulfillmentStatus\n processedAt\n confirmedAt\n cancelledAt\n expiredAt\n shippingAddress {\n ...MailingAddress\n }\n itemCount\n}",
2133
+ "onType": "Order"
2134
+ },
2135
+ {
2136
+ "name": "CartCost",
2137
+ "kind": "fragment",
2138
+ "section": "Cart",
2139
+ "description": "Cart-level totals — subtotal, total, tax, duty, checkout charge. Spread inside the `Cart` fragment.",
2140
+ "variables": [],
2141
+ "fragmentRefs": [
2142
+ "Money"
2143
+ ],
2144
+ "body": "fragment CartCost on CartCost {\n total {\n ...Money\n }\n subtotal {\n ...Money\n }\n totalTax {\n ...Money\n }\n totalDuty {\n ...Money\n }\n checkoutCharge {\n ...Money\n }\n}",
2145
+ "onType": "CartCost"
2146
+ },
2147
+ {
2148
+ "name": "CartLineCost",
2149
+ "kind": "fragment",
2150
+ "section": "Cart",
2151
+ "description": "Per-line cost breakdown — unit price, line subtotal/total, compare-at unit price (for showing strikethroughs). Spread inside `CartLine`.",
2152
+ "variables": [],
2153
+ "fragmentRefs": [
2154
+ "Money"
2155
+ ],
2156
+ "body": "fragment CartLineCost on CartLineCost {\n pricePerUnit {\n ...Money\n }\n subtotal {\n ...Money\n }\n total {\n ...Money\n }\n compareAtPricePerUnit {\n ...Money\n }\n}",
2157
+ "onType": "CartLineCost"
2158
+ },
2159
+ {
2160
+ "name": "AttributeSelection",
2161
+ "kind": "fragment",
2162
+ "section": "Cart",
2163
+ "description": "Typed snapshot of a customer-filled product attribute (configurator selection) on a cart line. Includes the chosen option / text value, fillingMode, billingMode, surcharge, tax class, and any linked variant. Distinct from `CartLine.attributes` which holds raw key-value line item properties (free-form, untyped).",
2164
+ "variables": [],
2165
+ "fragmentRefs": [],
2166
+ "body": "fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n}",
2167
+ "onType": "AttributeSelection"
2168
+ },
2169
+ {
2170
+ "name": "CartLine",
2171
+ "kind": "fragment",
2172
+ "section": "Cart",
2173
+ "description": "A single line in the cart — variant + quantity + per-line cost, plus dual attribute storage: `attributes[]` for free-form key-value properties (gift wrap, engraving notes), `attributeSelections[]` for typed configurator answers.",
2174
+ "variables": [],
2175
+ "fragmentRefs": [
2176
+ "AttributeSelection",
2177
+ "CartLineCost",
2178
+ "ProductVariant"
2179
+ ],
2180
+ "body": "fragment CartLine on CartLine {\n id\n quantity\n variant {\n ...ProductVariant\n }\n cost {\n ...CartLineCost\n }\n attributes {\n key\n value\n }\n attributeSelections {\n ...AttributeSelection\n }\n productId\n productTitle\n productHandle\n productType\n}",
2181
+ "onType": "CartLine"
2182
+ },
2183
+ {
2184
+ "name": "CartBuyerIdentity",
2185
+ "kind": "fragment",
2186
+ "section": "Cart",
2187
+ "description": "Buyer identity associated with the cart. Note: only `customerId` is currently persisted server-side; `email`, `phone`, `countryCode` are accepted in the input but ignored.",
2188
+ "variables": [],
2189
+ "fragmentRefs": [],
2190
+ "body": "fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n}",
2191
+ "onType": "CartBuyerIdentity"
2192
+ },
2193
+ {
2194
+ "name": "CartDiscountCode",
2195
+ "kind": "fragment",
2196
+ "section": "Cart",
2197
+ "description": "Discount code applied to the cart with its `isApplicable` flag — false means the code was kept on the cart but does not currently qualify (e.g. minimum spend not reached).",
2198
+ "variables": [],
2199
+ "fragmentRefs": [],
2200
+ "body": "fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n}",
2201
+ "onType": "CartDiscountCode"
2202
+ },
2203
+ {
2204
+ "name": "CartDiscountAllocation",
2205
+ "kind": "fragment",
2206
+ "section": "Cart",
2207
+ "description": "Allocation of a discount code to the cart total — pairs the code with the actual money discounted. Use to show \"saved X with code Y\" in cart UI.",
2208
+ "variables": [],
2209
+ "fragmentRefs": [
2210
+ "Money"
2211
+ ],
2212
+ "body": "fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount {\n ...Money\n }\n}",
2213
+ "onType": "CartDiscountAllocation"
2214
+ },
2215
+ {
2216
+ "name": "Cart",
2217
+ "kind": "fragment",
2218
+ "section": "Cart",
2219
+ "description": "Full cart shape — totals, line items (paginated up to 100), buyer identity, applied discount codes + allocations, note, custom attributes. Spread on the cart drawer / cart page; refetch after every cart mutation.",
2220
+ "variables": [],
2221
+ "fragmentRefs": [
2222
+ "CartBuyerIdentity",
2223
+ "CartCost",
2224
+ "CartDiscountAllocation",
2225
+ "CartDiscountCode",
2226
+ "CartLine",
2227
+ "PageInfo"
2228
+ ],
2229
+ "body": "fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost {\n ...CartCost\n }\n lines(first: 100) {\n edges {\n cursor\n node {\n ... on CartLine {\n ...CartLine\n }\n }\n }\n nodes {\n ... on CartLine {\n ...CartLine\n }\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n buyerIdentity {\n ...CartBuyerIdentity\n }\n discountCodes {\n ...CartDiscountCode\n }\n discountAllocations {\n ...CartDiscountAllocation\n }\n note\n attributes {\n key\n value\n }\n createdAt\n updatedAt\n}",
2230
+ "onType": "Cart"
2231
+ },
2232
+ {
2233
+ "name": "ShopColors",
2234
+ "kind": "fragment",
2235
+ "section": "Shop",
2236
+ "description": "Shop branding colors — primary, secondary, accent, background, text. Use to theme the storefront from server-side config.",
2237
+ "variables": [],
2238
+ "fragmentRefs": [],
2239
+ "body": "fragment ShopColors on ShopColors {\n primary\n secondary\n accent\n background\n text\n}",
2240
+ "onType": "ShopColors"
2241
+ },
2242
+ {
2243
+ "name": "ShopFonts",
2244
+ "kind": "fragment",
2245
+ "section": "Shop",
2246
+ "description": "Shop branding fonts — body (`primary`) and `heading` font families.",
2247
+ "variables": [],
2248
+ "fragmentRefs": [],
2249
+ "body": "fragment ShopFonts on ShopFonts {\n primary\n heading\n}",
2250
+ "onType": "ShopFonts"
2251
+ },
2252
+ {
2253
+ "name": "SocialLinks",
2254
+ "kind": "fragment",
2255
+ "section": "Shop",
2256
+ "description": "Social media links configured for the shop. Spread on the footer.",
2257
+ "variables": [],
2258
+ "fragmentRefs": [],
2259
+ "body": "fragment SocialLinks on SocialLinks {\n facebook\n instagram\n twitter\n youtube\n tiktok\n linkedin\n pinterest\n}",
2260
+ "onType": "SocialLinks"
2261
+ },
2262
+ {
2263
+ "name": "ShopAddress",
2264
+ "kind": "fragment",
2265
+ "section": "Shop",
2266
+ "description": "Shop's physical / business address. Use on the contact page and footer.",
2267
+ "variables": [],
2268
+ "fragmentRefs": [],
2269
+ "body": "fragment ShopAddress on ShopAddress {\n streetLine1\n streetLine2\n city\n state\n postalCode\n country\n}",
2270
+ "onType": "ShopAddress"
2271
+ },
2272
+ {
2273
+ "name": "BusinessHour",
2274
+ "kind": "fragment",
2275
+ "section": "Shop",
2276
+ "description": "One day's business hours window. Spread inside `Shop.businessHours[]`.",
2277
+ "variables": [],
2278
+ "fragmentRefs": [],
2279
+ "body": "fragment BusinessHour on BusinessHour {\n day\n openTime\n closeTime\n isClosed\n}",
2280
+ "onType": "BusinessHour"
2281
+ },
2282
+ {
2283
+ "name": "ShopBranding",
2284
+ "kind": "fragment",
2285
+ "section": "Shop",
2286
+ "description": "Full shop branding bundle — logo + favicon + colors + fonts + social links. Spread inside the `Shop` fragment.",
2287
+ "variables": [],
2288
+ "fragmentRefs": [
2289
+ "Image",
2290
+ "ShopColors",
2291
+ "ShopFonts",
2292
+ "SocialLinks"
2293
+ ],
2294
+ "body": "fragment ShopBranding on ShopBranding {\n logo {\n ...Image\n }\n favicon {\n ...Image\n }\n colors {\n ...ShopColors\n }\n fonts {\n ...ShopFonts\n }\n socialLinks {\n ...SocialLinks\n }\n}",
2295
+ "onType": "ShopBranding"
2296
+ },
2297
+ {
2298
+ "name": "BotProtectionProvider",
2299
+ "kind": "fragment",
2300
+ "section": "Shop",
2301
+ "description": "Bot-protection provider config (provider name, site key, script URL) for storefront-side challenge widgets.",
2302
+ "variables": [],
2303
+ "fragmentRefs": [],
2304
+ "body": "fragment BotProtectionProvider on BotProtectionProviderInfo {\n provider\n siteKey\n scriptUrl\n}",
2305
+ "onType": "BotProtectionProviderInfo"
2306
+ },
2307
+ {
2308
+ "name": "BotProtection",
2309
+ "kind": "fragment",
2310
+ "section": "Shop",
2311
+ "description": "Bot-protection setup for the shop — primary + fallback provider, and the list of `protectedOperations` (mutation names that require a challenge token). Spread inside `Shop`.",
2312
+ "variables": [],
2313
+ "fragmentRefs": [
2314
+ "BotProtectionProvider"
2315
+ ],
2316
+ "body": "fragment BotProtection on BotProtectionInfo {\n primary {\n ...BotProtectionProvider\n }\n fallback {\n ...BotProtectionProvider\n }\n protectedOperations\n}",
2317
+ "onType": "BotProtectionInfo"
2318
+ },
2319
+ {
2320
+ "name": "Shop",
2321
+ "kind": "fragment",
2322
+ "section": "Shop",
2323
+ "description": "The shop itself — name, primary domain, currencies + locales, branding, contact info, business hours, bot-protection config. Spread on the root `shop` query; cache for the session.",
2324
+ "variables": [],
2325
+ "fragmentRefs": [
2326
+ "BotProtection",
2327
+ "BusinessHour",
2328
+ "Image",
2329
+ "ShopAddress",
2330
+ "ShopBranding"
2331
+ ],
2332
+ "body": "fragment Shop on Shop {\n id\n name\n description\n primaryDomain {\n host\n url\n isSslEnabled\n }\n currencyCode\n supportedCurrencies\n paymentCurrencies\n defaultLanguage\n supportedLanguages\n logo {\n ...Image\n }\n contactEmail\n contactPhone\n address {\n ...ShopAddress\n }\n businessHours {\n ...BusinessHour\n }\n branding {\n ...ShopBranding\n }\n botProtection {\n ...BotProtection\n }\n}",
2333
+ "onType": "Shop"
2334
+ },
2335
+ {
2336
+ "name": "PaymentMethod",
2337
+ "kind": "fragment",
2338
+ "section": "Payment Methods",
2339
+ "description": "Single payment method enabled for the shop — type (CARD / BANK_TRANSFER / BLIK / PAYPAL / APPLE_PAY / GOOGLE_PAY / CASH_ON_DELIVERY / OTHER), provider, icon, supported currencies, default flag, sort position. Spread on the checkout payment step.",
2340
+ "variables": [],
2341
+ "fragmentRefs": [],
2342
+ "body": "fragment PaymentMethod on PaymentMethod {\n id\n name\n provider\n type\n icon\n description\n isDefault\n supportedCurrencies\n position\n}",
2343
+ "onType": "PaymentMethod"
2344
+ },
2345
+ {
2346
+ "name": "AvailablePaymentMethods",
2347
+ "kind": "fragment",
2348
+ "section": "Payment Methods",
2349
+ "description": "Active payment methods list with the merchant's `defaultMethod`. Returned by the `availablePaymentMethods` query.",
2350
+ "variables": [],
2351
+ "fragmentRefs": [
2352
+ "PaymentMethod"
2353
+ ],
2354
+ "body": "fragment AvailablePaymentMethods on AvailablePaymentMethods {\n methods {\n ...PaymentMethod\n }\n defaultMethod {\n ...PaymentMethod\n }\n}",
2355
+ "onType": "AvailablePaymentMethods"
2356
+ },
2357
+ {
2358
+ "name": "ShippingRate",
2359
+ "kind": "fragment",
2360
+ "section": "Checkout",
2361
+ "description": "Single shipping rate option — `handle` is the stable id you pass to `checkoutShippingLineUpdate`, plus title and price.",
2362
+ "variables": [],
2363
+ "fragmentRefs": [
2364
+ "Money"
2365
+ ],
2366
+ "body": "fragment ShippingRate on ShippingRate {\n handle\n title\n price {\n ...Money\n }\n}",
2367
+ "onType": "ShippingRate"
2368
+ },
2369
+ {
2370
+ "name": "TaxLine",
2371
+ "kind": "fragment",
2372
+ "section": "Checkout",
2373
+ "description": "One tax line on the checkout — title, rate (decimal, e.g. 0.23 for 23%), computed amount. Spread on the order summary.",
2374
+ "variables": [],
2375
+ "fragmentRefs": [
2376
+ "Money"
2377
+ ],
2378
+ "body": "fragment TaxLine on TaxLine {\n title\n rate\n price {\n ...Money\n }\n}",
2379
+ "onType": "TaxLine"
2380
+ },
2381
+ {
2382
+ "name": "DiscountAffectedItem",
2383
+ "kind": "fragment",
2384
+ "section": "Checkout",
2385
+ "description": "Item affected by a discount — the discounted product/variant with original + discounted prices and savings. Used on Buy-X-Get-Y promotions to highlight which items the discount applies to.",
2386
+ "variables": [],
2387
+ "fragmentRefs": [
2388
+ "Money"
2389
+ ],
2390
+ "body": "fragment DiscountAffectedItem on DiscountAffectedItem {\n productId\n variantId\n title\n quantity\n originalPrice {\n ...Money\n }\n discountedPrice {\n ...Money\n }\n savings {\n ...Money\n }\n isFreeItem\n}",
2391
+ "onType": "DiscountAffectedItem"
2392
+ },
2393
+ {
2394
+ "name": "DiscountApplication",
2395
+ "kind": "fragment",
2396
+ "section": "Checkout",
2397
+ "description": "A discount currently applied to the checkout — code, type, value, plus BXGY (Buy X Get Y) metadata when applicable (`buyQuantity`, `getQuantity`, `getDiscountPercent`, `affectedItems`). Use to render a \"Discounts applied\" panel.",
2398
+ "variables": [],
2399
+ "fragmentRefs": [
2400
+ "DiscountAffectedItem",
2401
+ "Money"
2402
+ ],
2403
+ "body": "fragment DiscountApplication on DiscountApplication {\n code\n isApplicable\n type\n value {\n ...Money\n }\n title\n affectedItems {\n ...DiscountAffectedItem\n }\n buyQuantity\n getQuantity\n getDiscountPercent\n}",
2404
+ "onType": "DiscountApplication"
2405
+ },
2406
+ {
2407
+ "name": "DiscountCode",
2408
+ "kind": "fragment",
2409
+ "section": "Checkout",
2410
+ "description": "Lightweight discount code entry on the checkout — code + applicability flag.",
2411
+ "variables": [],
2412
+ "fragmentRefs": [],
2413
+ "body": "fragment DiscountCode on DiscountCode {\n code\n isApplicable\n}",
2414
+ "onType": "DiscountCode"
2415
+ },
2416
+ {
2417
+ "name": "CheckoutLineItem",
2418
+ "kind": "fragment",
2419
+ "section": "Checkout",
2420
+ "description": "Single line item in the checkout — variant snapshot, quantity, unit + total prices, image. Use on the order summary panel.",
2421
+ "variables": [],
2422
+ "fragmentRefs": [
2423
+ "ImageThumbnail",
2424
+ "Money"
2425
+ ],
2426
+ "body": "fragment CheckoutLineItem on CheckoutLineItem {\n id\n title\n variantTitle\n quantity\n pricePerUnit {\n ...Money\n }\n total {\n ...Money\n }\n variantId\n productId\n sku\n image {\n ...ImageThumbnail\n }\n}",
2427
+ "onType": "CheckoutLineItem"
2428
+ },
2429
+ {
2430
+ "name": "AppliedGiftCard",
2431
+ "kind": "fragment",
2432
+ "section": "Checkout",
2433
+ "description": "Gift card applied to the checkout — `maskedCode` (first + last 4 chars), `lastCharacters` (for display matching), the amount applied to this checkout, and remaining balance after this order would complete.",
2434
+ "variables": [],
2435
+ "fragmentRefs": [
2436
+ "Money"
2437
+ ],
2438
+ "body": "fragment AppliedGiftCard on AppliedGiftCard {\n maskedCode\n lastCharacters\n appliedAmount {\n ...Money\n }\n remainingBalance {\n ...Money\n }\n}",
2439
+ "onType": "AppliedGiftCard"
2440
+ },
2441
+ {
2442
+ "name": "Checkout",
2443
+ "kind": "fragment",
2444
+ "section": "Checkout",
2445
+ "description": "Full checkout shape — line items, shipping + billing addresses, selected + available shipping rates, available payment methods, applied discounts + gift cards, tax lines, totals (`cost`, `paymentDue`, `totalGiftCardAmount`). Spread on the checkout flow; refetch after every checkout mutation. `isReady` flips to true when the checkout has all required fields to call `checkoutComplete`.",
2446
+ "variables": [],
2447
+ "fragmentRefs": [
2448
+ "AppliedGiftCard",
2449
+ "CheckoutLineItem",
2450
+ "DiscountApplication",
2451
+ "DiscountCode",
2452
+ "MailingAddress",
2453
+ "Money",
2454
+ "PaymentMethod",
2455
+ "ShippingRate",
2456
+ "TaxLine"
2457
+ ],
2458
+ "body": "fragment Checkout on Checkout {\n id\n isReady\n isCompleted\n completedOrderId\n webUrl\n lineItems {\n ...CheckoutLineItem\n }\n totalQuantity\n shippingAddress {\n ...MailingAddress\n }\n billingAddress {\n ...MailingAddress\n }\n shippingLine {\n ...ShippingRate\n }\n availableShippingRates {\n ...ShippingRate\n }\n shippingRatesReady\n email\n phone\n customerId\n discountCodes {\n ...DiscountCode\n }\n discountApplications {\n ...DiscountApplication\n }\n availablePaymentMethods {\n ...PaymentMethod\n }\n selectedPaymentMethodId\n cost {\n subtotal {\n ...Money\n }\n total {\n ...Money\n }\n totalTax {\n ...Money\n }\n totalShipping {\n ...Money\n }\n totalDiscounts {\n ...Money\n }\n }\n taxLines {\n ...TaxLine\n }\n appliedGiftCards {\n ...AppliedGiftCard\n }\n totalGiftCardAmount {\n ...Money\n }\n paymentDue {\n ...Money\n }\n currencyCode\n note\n createdAt\n updatedAt\n}",
2459
+ "onType": "Checkout"
2460
+ },
2461
+ {
2462
+ "name": "ShipmentEvent",
2463
+ "kind": "fragment",
2464
+ "section": "Shipments / Tracking",
2465
+ "description": "One tracking event in the shipment timeline — status, description, location, timestamp. Spread on the tracking page timeline.",
2466
+ "variables": [],
2467
+ "fragmentRefs": [],
2468
+ "body": "fragment ShipmentEvent on ShipmentEvent {\n id\n status\n description\n location\n occurredAt\n providerEventCode\n}",
2469
+ "onType": "ShipmentEvent"
2470
+ },
2471
+ {
2472
+ "name": "ShipmentPackage",
2473
+ "kind": "fragment",
2474
+ "section": "Shipments / Tracking",
2475
+ "description": "Physical package metadata (weight + dimensions). Used in the merchant's label generation; storefronts rarely render this directly.",
2476
+ "variables": [],
2477
+ "fragmentRefs": [],
2478
+ "body": "fragment ShipmentPackage on ShipmentPackage {\n weight\n length\n width\n height\n}",
2479
+ "onType": "ShipmentPackage"
2480
+ },
2481
+ {
2482
+ "name": "ShipmentItem",
2483
+ "kind": "fragment",
2484
+ "section": "Shipments / Tracking",
2485
+ "description": "One item in a shipment — title, variant, sku, quantity, image URL. Spread inside `Shipment.items[]` for the tracking page item list.",
2486
+ "variables": [],
2487
+ "fragmentRefs": [],
2488
+ "body": "fragment ShipmentItem on ShipmentItem {\n id\n title\n variantTitle\n sku\n quantity\n imageUrl\n}",
2489
+ "onType": "ShipmentItem"
2490
+ },
2491
+ {
2492
+ "name": "Shipment",
2493
+ "kind": "fragment",
2494
+ "section": "Shipments / Tracking",
2495
+ "description": "Full shipment shape — provider, tracking number + URL, label URL, status, ETA, recipient address, packages, items, full event timeline. Spread on the tracking page.",
2496
+ "variables": [],
2497
+ "fragmentRefs": [
2498
+ "MailingAddress",
2499
+ "ShipmentEvent",
2500
+ "ShipmentItem",
2501
+ "ShipmentPackage"
2502
+ ],
2503
+ "body": "fragment Shipment on Shipment {\n id\n orderId\n provider\n serviceCode\n trackingNumber\n trackingUrl\n labelUrl\n status\n estimatedDeliveryAt\n shippedAt\n deliveredAt\n recipientAddress {\n ...MailingAddress\n }\n packages {\n ...ShipmentPackage\n }\n items {\n ...ShipmentItem\n }\n events {\n ...ShipmentEvent\n }\n createdAt\n updatedAt\n}",
2504
+ "onType": "Shipment"
2505
+ },
2506
+ {
2507
+ "name": "ShipmentBasic",
2508
+ "kind": "fragment",
2509
+ "section": "Shipments / Tracking",
2510
+ "description": "Lightweight shipment shape — id, tracking number + URL, status, dates. No items / events / address. Use for order summary cards or on the public `shipmentByTrackingNumber` query.",
2511
+ "variables": [],
2512
+ "fragmentRefs": [],
2513
+ "body": "fragment ShipmentBasic on Shipment {\n id\n orderId\n provider\n trackingNumber\n trackingUrl\n status\n estimatedDeliveryAt\n shippedAt\n deliveredAt\n createdAt\n}",
2514
+ "onType": "Shipment"
2515
+ },
2516
+ {
2517
+ "name": "ReturnShippingLabel",
2518
+ "kind": "fragment",
2519
+ "section": "Returns / RMA",
2520
+ "description": "Return shipping label generated by the carrier — URL to download, carrier name, tracking number, expiry. Spread on the return detail page.",
2521
+ "variables": [],
2522
+ "fragmentRefs": [],
2523
+ "body": "fragment ReturnShippingLabel on ReturnShippingLabel {\n url\n carrier\n trackingNumber\n expiresAt\n}",
2524
+ "onType": "ReturnShippingLabel"
2525
+ },
2526
+ {
2527
+ "name": "ReturnItemPhoto",
2528
+ "kind": "fragment",
2529
+ "section": "Returns / RMA",
2530
+ "description": "Photo evidence attached to a return item (e.g. damage photo). Spread inside `ReturnItem.photos[]`.",
2531
+ "variables": [],
2532
+ "fragmentRefs": [],
2533
+ "body": "fragment ReturnItemPhoto on ReturnItemPhoto {\n id\n url\n alt\n description\n createdAt\n}",
2534
+ "onType": "ReturnItemPhoto"
2535
+ },
2536
+ {
2537
+ "name": "ReturnItem",
2538
+ "kind": "fragment",
2539
+ "section": "Returns / RMA",
2540
+ "description": "Single line in a return request — variant identity, quantity requested, reason, condition, photos, status, approved quantity (set by merchant after review). Spread inside `Return.items[]`.",
2541
+ "variables": [],
2542
+ "fragmentRefs": [
2543
+ "Money",
2544
+ "ReturnItemPhoto"
2545
+ ],
2546
+ "body": "fragment ReturnItem on ReturnItem {\n id\n variantId\n productTitle\n variantTitle\n sku\n imageUrl\n quantity\n reason\n condition\n unitPrice {\n ...Money\n }\n photos {\n ...ReturnItemPhoto\n }\n status\n approvedQuantity\n}",
2547
+ "onType": "ReturnItem"
2548
+ },
2549
+ {
2550
+ "name": "Return",
2551
+ "kind": "fragment",
2552
+ "section": "Returns / RMA",
2553
+ "description": "Full return shape — number, parent order, status, reason, customer note, compensation type (`REFUND` / `STORE_CREDIT`), items, refund amount, shipping label, lifecycle timestamps. Spread on the return detail page.",
2554
+ "variables": [],
2555
+ "fragmentRefs": [
2556
+ "Money",
2557
+ "ReturnItem",
2558
+ "ReturnShippingLabel"
2559
+ ],
2560
+ "body": "fragment Return on Return {\n id\n returnNumber\n orderId\n orderNumber\n status\n reason\n customerNote\n compensationType\n items {\n ...ReturnItem\n }\n refundAmount {\n ...Money\n }\n shippingLabel {\n ...ReturnShippingLabel\n }\n requestedAt\n approvedAt\n receivedAt\n refundedAt\n completedAt\n createdAt\n updatedAt\n}",
2561
+ "onType": "Return"
2562
+ },
2563
+ {
2564
+ "name": "ReturnReasonOption",
2565
+ "kind": "fragment",
2566
+ "section": "Returns / RMA",
2567
+ "description": "Single option in the return reasons dropdown — `value` enum, human-readable `label`, optional `description`. Returned by `returnReasons` query.",
2568
+ "variables": [],
2569
+ "fragmentRefs": [],
2570
+ "body": "fragment ReturnReasonOption on ReturnReasonOption {\n value\n label\n description\n}",
2571
+ "onType": "ReturnReasonOption"
2572
+ },
2573
+ {
2574
+ "name": "GiftCard",
2575
+ "kind": "fragment",
2576
+ "section": "Gift Cards",
2577
+ "description": "Gift card detail — masked code (first + last 4 chars), status, initial + remaining balance, expiry, recipient/message. Returned by `giftCard($code)` query.",
2578
+ "variables": [],
2579
+ "fragmentRefs": [
2580
+ "Money"
2581
+ ],
2582
+ "body": "fragment GiftCard on GiftCard {\n id\n maskedCode\n status\n initialAmount {\n ...Money\n }\n balance {\n ...Money\n }\n expiresAt\n recipientName\n message\n createdAt\n}",
2583
+ "onType": "GiftCard"
2584
+ },
2585
+ {
2586
+ "name": "GiftCardError",
2587
+ "kind": "fragment",
2588
+ "section": "Gift Cards",
2589
+ "description": "Validation error on a gift card check — code (`NOT_FOUND` / `DISABLED` / `ALREADY_USED` / `EXPIRED` / `INSUFFICIENT_BALANCE`) + human message.",
2590
+ "variables": [],
2591
+ "fragmentRefs": [],
2592
+ "body": "fragment GiftCardError on GiftCardError {\n code\n message\n}",
2593
+ "onType": "GiftCardError"
2594
+ },
2595
+ {
2596
+ "name": "GiftCardValidation",
2597
+ "kind": "fragment",
2598
+ "section": "Gift Cards",
2599
+ "description": "Result of `giftCardValidate($code, $amount)` — `isValid` flag, available balance, optional `error` (when invalid), and the matched gift card (when found). Use to inline-validate gift card inputs before applying.",
2600
+ "variables": [],
2601
+ "fragmentRefs": [
2602
+ "GiftCard",
2603
+ "GiftCardError",
2604
+ "Money"
2605
+ ],
2606
+ "body": "fragment GiftCardValidation on GiftCardValidation {\n isValid\n availableBalance {\n ...Money\n }\n error {\n ...GiftCardError\n }\n giftCard {\n ...GiftCard\n }\n}",
2607
+ "onType": "GiftCardValidation"
2608
+ },
2609
+ {
2610
+ "name": "ShippingCarrier",
2611
+ "kind": "fragment",
2612
+ "section": "Shipping Methods",
2613
+ "description": "Carrier offering the shipping method — id, display name, logo URL, internal service code.",
2614
+ "variables": [],
2615
+ "fragmentRefs": [],
2616
+ "body": "fragment ShippingCarrier on ShippingCarrier {\n id\n name\n logoUrl\n serviceCode\n}",
2617
+ "onType": "ShippingCarrier"
2618
+ },
2619
+ {
2620
+ "name": "DeliveryEstimate",
2621
+ "kind": "fragment",
2622
+ "section": "Shipping Methods",
2623
+ "description": "Estimated delivery window — `minDays` to `maxDays` plus a human-readable description (e.g. \"2-4 business days\").",
2624
+ "variables": [],
2625
+ "fragmentRefs": [],
2626
+ "body": "fragment DeliveryEstimate on DeliveryEstimate {\n minDays\n maxDays\n description\n}",
2627
+ "onType": "DeliveryEstimate"
2628
+ },
2629
+ {
2630
+ "name": "FreeShippingProgress",
2631
+ "kind": "fragment",
2632
+ "section": "Shipping Methods",
2633
+ "description": "Free-shipping progress info — `qualifies` flag, current cart amount, threshold, remaining to qualify, percent progress, and a localized message (\"Add 20 PLN more for free shipping\"). Use to render a free-shipping progress bar in the cart drawer.",
2634
+ "variables": [],
2635
+ "fragmentRefs": [
2636
+ "Money"
2637
+ ],
2638
+ "body": "fragment FreeShippingProgress on FreeShippingProgress {\n qualifies\n currentAmount {\n ...Money\n }\n threshold {\n ...Money\n }\n remaining {\n ...Money\n }\n progressPercent\n message\n}",
2639
+ "onType": "FreeShippingProgress"
2640
+ },
2641
+ {
2642
+ "name": "AvailableShippingMethod",
2643
+ "kind": "fragment",
2644
+ "section": "Shipping Methods",
2645
+ "description": "One shipping method offered for the destination + cart — id, name, carrier, price, free-shipping progress, estimated delivery, sort order. Spread on the checkout shipping step.",
2646
+ "variables": [],
2647
+ "fragmentRefs": [
2648
+ "DeliveryEstimate",
2649
+ "FreeShippingProgress",
2650
+ "Money",
2651
+ "ShippingCarrier"
2652
+ ],
2653
+ "body": "fragment AvailableShippingMethod on AvailableShippingMethod {\n id\n name\n description\n carrier {\n ...ShippingCarrier\n }\n price {\n ...Money\n }\n isFree\n estimatedDelivery {\n ...DeliveryEstimate\n }\n freeShippingProgress {\n ...FreeShippingProgress\n }\n sortOrder\n}",
2654
+ "onType": "AvailableShippingMethod"
2655
+ },
2656
+ {
2657
+ "name": "AttributeSwatch",
2658
+ "kind": "fragment",
2659
+ "section": "Attribute Filters",
2660
+ "description": "Visual swatch for an attribute filter value — color hex (for color filters) or image URL (for pattern/material swatches).",
2661
+ "variables": [],
2662
+ "fragmentRefs": [],
2663
+ "body": "fragment AttributeSwatch on AttributeSwatch {\n colorHex\n imageUrl\n}",
2664
+ "onType": "AttributeSwatch"
2665
+ },
2666
+ {
2667
+ "name": "AttributeRangeBounds",
2668
+ "kind": "fragment",
2669
+ "section": "Attribute Filters",
2670
+ "description": "Numeric range bounds for slider-style filters — min, max, currency code (when relevant).",
2671
+ "variables": [],
2672
+ "fragmentRefs": [],
2673
+ "body": "fragment AttributeRangeBounds on AttributeRangeBounds {\n min\n max\n currencyCode\n}",
2674
+ "onType": "AttributeRangeBounds"
2675
+ },
2676
+ {
2677
+ "name": "AttributeFilterValue",
2678
+ "kind": "fragment",
2679
+ "section": "Attribute Filters",
2680
+ "description": "One discrete value in a filterable attribute (e.g. \"Red\" for the Color filter). Includes `productCount` in the current listing context (for \"(12)\" badges next to filter values), optional swatch and price modifier.",
2681
+ "variables": [],
2682
+ "fragmentRefs": [
2683
+ "AttributeSwatch",
2684
+ "Money"
2685
+ ],
2686
+ "body": "fragment AttributeFilterValue on AttributeFilterValue {\n id\n value\n label\n productCount\n swatch {\n ...AttributeSwatch\n }\n priceModifier {\n ...Money\n }\n sortOrder\n}",
2687
+ "onType": "AttributeFilterValue"
2688
+ },
2689
+ {
2690
+ "name": "AttributeDefinition",
2691
+ "kind": "fragment",
2692
+ "section": "Attribute Filters",
2693
+ "description": "Filterable attribute exposed on the storefront — name, type (SELECT / CHECKBOX / SLIDER / etc.), filterability flags, display order, and either discrete `filterValues[]` or numeric `rangeBounds`. Spread inside `availableFilters.attributes[]`.",
2694
+ "variables": [],
2695
+ "fragmentRefs": [
2696
+ "AttributeFilterValue",
2697
+ "AttributeRangeBounds"
2698
+ ],
2699
+ "body": "fragment AttributeDefinition on AttributeDefinition {\n id\n name\n handle\n type\n isFilterable\n isVisible\n displayOrder\n filterValues {\n ...AttributeFilterValue\n }\n rangeBounds {\n ...AttributeRangeBounds\n }\n}",
2700
+ "onType": "AttributeDefinition"
2701
+ },
2702
+ {
2703
+ "name": "PriceRangeFilter",
2704
+ "kind": "fragment",
2705
+ "section": "Attribute Filters",
2706
+ "description": "Min / max price range across products in the current listing context. Use to bound the price slider.",
2707
+ "variables": [],
2708
+ "fragmentRefs": [
2709
+ "Money"
2710
+ ],
2711
+ "body": "fragment PriceRangeFilter on PriceRange {\n min {\n ...Money\n }\n max {\n ...Money\n }\n}",
2712
+ "onType": "PriceRange"
2713
+ },
2714
+ {
2715
+ "name": "CategoryFilterOption",
2716
+ "kind": "fragment",
2717
+ "section": "Attribute Filters",
2718
+ "description": "One category option in the categories filter — id, name, slug, count of products in this category within the current listing context, level + parentId for tree rendering.",
2719
+ "variables": [],
2720
+ "fragmentRefs": [],
2721
+ "body": "fragment CategoryFilterOption on CategoryFilterOption {\n id\n name\n slug\n productCount\n level\n parentId\n}",
2722
+ "onType": "CategoryFilterOption"
2723
+ },
2724
+ {
2725
+ "name": "AvailableFilters",
2726
+ "kind": "fragment",
2727
+ "section": "Attribute Filters",
2728
+ "description": "Full result of the `availableFilters($input)` query — attribute filters, price range, category filters, count of currently active filters, total products matching the context. Spread on listing pages to render filter sidebars.",
2729
+ "variables": [],
2730
+ "fragmentRefs": [
2731
+ "AttributeDefinition",
2732
+ "CategoryFilterOption",
2733
+ "PriceRangeFilter"
2734
+ ],
2735
+ "body": "fragment AvailableFilters on AvailableFilters {\n attributes {\n ...AttributeDefinition\n }\n priceRange {\n ...PriceRangeFilter\n }\n categories {\n ...CategoryFilterOption\n }\n activeFilterCount\n totalProducts\n}",
2736
+ "onType": "AvailableFilters"
2737
+ },
2738
+ {
2739
+ "name": "LoyaltyPageInfo",
2740
+ "kind": "fragment",
2741
+ "section": "Loyalty Program",
2742
+ "description": "Page metadata for the loyalty transactions connection (separate type from generic `PageInfo` for legacy reasons; identical shape).",
2743
+ "variables": [],
2744
+ "fragmentRefs": [],
2745
+ "body": "fragment LoyaltyPageInfo on LoyaltyPageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n}",
2746
+ "onType": "LoyaltyPageInfo"
2747
+ },
2748
+ {
2749
+ "name": "LoyaltyTier",
2750
+ "kind": "fragment",
2751
+ "section": "Loyalty Program",
2752
+ "description": "Loyalty tier definition — name, type enum (`BRONZE` / `SILVER` / `GOLD` / `PLATINUM` / `DIAMOND`), entry threshold (`minPoints` and/or `minAnnualSpend`), points multiplier, custom benefits list. Returned by `loyaltyTiers` and embedded in member tier data.",
2753
+ "variables": [],
2754
+ "fragmentRefs": [
2755
+ "Money"
2756
+ ],
2757
+ "body": "fragment LoyaltyTier on LoyaltyTier {\n id\n name\n type\n minPoints\n minAnnualSpend {\n ...Money\n }\n pointsMultiplier\n customBenefits {\n name\n description\n icon\n }\n}",
2758
+ "onType": "LoyaltyTier"
2759
+ },
2760
+ {
2761
+ "name": "LoyaltyPointsSummary",
2762
+ "kind": "fragment",
2763
+ "section": "Loyalty Program",
2764
+ "description": "Customer's points breakdown — total earned, currently spendable, pending (not yet vested), redeemed lifetime, expired lifetime, expiring soon, and the next expiry date. Spread inside `LoyaltyMember`.",
2765
+ "variables": [],
2766
+ "fragmentRefs": [],
2767
+ "body": "fragment LoyaltyPointsSummary on LoyaltyPointsSummary {\n totalPoints\n currentPoints\n pendingPoints\n redeemedPoints\n expiredPoints\n expiringPoints\n nextExpiryDate\n}",
2768
+ "onType": "LoyaltyPointsSummary"
2769
+ },
2770
+ {
2771
+ "name": "TierProgress",
2772
+ "kind": "fragment",
2773
+ "section": "Loyalty Program",
2774
+ "description": "Customer's progress toward the next tier — current tier, next tier, points + spend remaining, percent progress. Use to render the \"X points to GOLD\" tracker.",
2775
+ "variables": [],
2776
+ "fragmentRefs": [
2777
+ "LoyaltyTier",
2778
+ "Money"
2779
+ ],
2780
+ "body": "fragment TierProgress on TierProgress {\n currentTier {\n ...LoyaltyTier\n }\n nextTier {\n ...LoyaltyTier\n }\n pointsToNextTier\n progressPercent\n spendToNextTier {\n ...Money\n }\n}",
2781
+ "onType": "TierProgress"
2782
+ },
2783
+ {
2784
+ "name": "LoyaltyMember",
2785
+ "kind": "fragment",
2786
+ "section": "Loyalty Program",
2787
+ "description": "Customer's loyalty membership — points summary, current tier, tier progress, annual spend, last activity. Returned by `loyaltyMember` (null if not enrolled).",
2788
+ "variables": [],
2789
+ "fragmentRefs": [
2790
+ "LoyaltyPointsSummary",
2791
+ "LoyaltyTier",
2792
+ "Money",
2793
+ "TierProgress"
2794
+ ],
2795
+ "body": "fragment LoyaltyMember on LoyaltyMember {\n id\n customerId\n points {\n ...LoyaltyPointsSummary\n }\n tier {\n ...LoyaltyTier\n }\n tierProgress {\n ...TierProgress\n }\n annualSpend {\n ...Money\n }\n lastActivityAt\n enrolledAt\n}",
2796
+ "onType": "LoyaltyMember"
2797
+ },
2798
+ {
2799
+ "name": "LoyaltyTransaction",
2800
+ "kind": "fragment",
2801
+ "section": "Loyalty Program",
2802
+ "description": "One row in the loyalty points history — type (`EARN_PURCHASE` / `EARN_SIGNUP` / `EARN_REFERRAL` / `EARN_REVIEW` / `EARN_BIRTHDAY` / `EARN_BONUS` / `REDEEM` / `EXPIRE` / `ADJUST` / `REFUND_REVERSAL`), points delta, balance after, source order, expiry. Spread on the loyalty dashboard transaction list.",
2803
+ "variables": [],
2804
+ "fragmentRefs": [],
2805
+ "body": "fragment LoyaltyTransaction on LoyaltyTransaction {\n id\n type\n points\n balanceAfter\n orderId\n description\n expiresAt\n createdAt\n}",
2806
+ "onType": "LoyaltyTransaction"
2807
+ },
2808
+ {
2809
+ "name": "LoyaltyReward",
2810
+ "kind": "fragment",
2811
+ "section": "Loyalty Program",
2812
+ "description": "Reward customers can redeem — name, type, points cost, discount value (% or fixed), tier requirement, availability flag, remaining redemptions. Spread on the rewards page.",
2813
+ "variables": [],
2814
+ "fragmentRefs": [
2815
+ "ImageCard",
2816
+ "LoyaltyTier",
2817
+ "Money"
2818
+ ],
2819
+ "body": "fragment LoyaltyReward on LoyaltyReward {\n id\n name\n slug\n type\n pointsCost\n discountPercent\n discountAmount {\n ...Money\n }\n description\n image {\n ...ImageCard\n }\n isAvailable\n tierRequired {\n ...LoyaltyTier\n }\n redemptionsRemaining\n}",
2820
+ "onType": "LoyaltyReward"
2821
+ },
2822
+ {
2823
+ "name": "PointsEstimate",
2824
+ "kind": "fragment",
2825
+ "section": "Loyalty Program",
2826
+ "description": "Estimated points for an order — base points, bonus points (tier multiplier applied), total, multiplier used. Returned by `estimatePoints($orderTotal)` for \"Earn X points\" UI on cart/checkout.",
2827
+ "variables": [],
2828
+ "fragmentRefs": [],
2829
+ "body": "fragment PointsEstimate on PointsEstimate {\n basePoints\n bonusPoints\n totalPoints\n multiplier\n}",
2830
+ "onType": "PointsEstimate"
2831
+ },
2832
+ {
2833
+ "name": "LoyaltyAction",
2834
+ "kind": "fragment",
2835
+ "section": "Loyalty Program",
2836
+ "description": "One earn action configured in the loyalty program — type (`PURCHASE` / `SIGNUP` / `REFERRAL` / `REVIEW` / `BIRTHDAY`), enabled flag, points granted.",
2837
+ "variables": [],
2838
+ "fragmentRefs": [],
2839
+ "body": "fragment LoyaltyAction on LoyaltyAction {\n type\n isEnabled\n points\n}",
2840
+ "onType": "LoyaltyAction"
2841
+ },
2842
+ {
2843
+ "name": "LoyaltySettings",
2844
+ "kind": "fragment",
2845
+ "section": "Loyalty Program",
2846
+ "description": "Loyalty program configuration — `isEnabled` (use to gate UI rendering), points name (e.g. \"stars\"), earn rate, expiry policy, available actions, referral settings. Returned by `loyaltySettings`.",
2847
+ "variables": [],
2848
+ "fragmentRefs": [
2849
+ "LoyaltyAction"
2850
+ ],
2851
+ "body": "fragment LoyaltySettings on LoyaltySettings {\n isEnabled\n pointsName\n pointsPerCurrency\n pointsExpiryMonths\n availableActions {\n ...LoyaltyAction\n }\n referralEnabled\n referralPoints\n referralBonusPoints\n}",
2852
+ "onType": "LoyaltySettings"
2853
+ },
2854
+ {
2855
+ "name": "ReferralStats",
2856
+ "kind": "fragment",
2857
+ "section": "Loyalty Program",
2858
+ "description": "Customer referral statistics — code, share URL, counts of referred / completed / pending, lifetime points earned. Returned by `referralStats`.",
2859
+ "variables": [],
2860
+ "fragmentRefs": [],
2861
+ "body": "fragment ReferralStats on ReferralStats {\n referralCode\n shareUrl\n totalReferred\n completedReferrals\n pendingReferrals\n totalPointsEarned\n}",
2862
+ "onType": "ReferralStats"
2863
+ },
2864
+ {
2865
+ "name": "RedeemRewardPayload",
2866
+ "kind": "fragment",
2867
+ "section": "Loyalty Program",
2868
+ "description": "Result of `redeemLoyaltyReward` — depending on the reward type, exactly one of `discountCode`, `productDiscountCode`, `giftCardCode` is populated. Apply the returned code on cart/checkout.",
2869
+ "variables": [],
2870
+ "fragmentRefs": [],
2871
+ "body": "fragment RedeemRewardPayload on RedeemRewardPayload {\n success\n discountCode\n productDiscountCode\n giftCardCode\n userErrors\n}",
2872
+ "onType": "RedeemRewardPayload"
2873
+ },
2874
+ {
2875
+ "name": "GenerateReferralCodePayload",
2876
+ "kind": "fragment",
2877
+ "section": "Loyalty Program",
2878
+ "description": "Result of `generateReferralCode` — the customer's referral code and shareable URL.",
2879
+ "variables": [],
2880
+ "fragmentRefs": [],
2881
+ "body": "fragment GenerateReferralCodePayload on GenerateReferralCodePayload {\n success\n referralCode\n shareUrl\n userErrors\n}",
2882
+ "onType": "GenerateReferralCodePayload"
2883
+ },
2884
+ {
2885
+ "name": "ProductReview",
2886
+ "kind": "fragment",
2887
+ "section": "Reviews",
2888
+ "description": "Single product review — rating, title, body, optional pros/cons, image attachments, author, verified-purchase flag, helpful/unhelpful counts, optional merchant response. Only `APPROVED` reviews are exposed to the storefront.",
2889
+ "variables": [],
2890
+ "fragmentRefs": [],
2891
+ "body": "fragment ProductReview on ProductReview {\n id\n productId\n rating\n title\n content\n pros\n cons\n images\n authorName\n isVerifiedPurchase\n helpfulCount\n unhelpfulCount\n response\n responseAt\n createdAt\n}",
2892
+ "onType": "ProductReview"
2893
+ },
2894
+ {
2895
+ "name": "ReviewStats",
2896
+ "kind": "fragment",
2897
+ "section": "Reviews",
2898
+ "description": "Aggregate review stats for a product — average rating, total count, distribution per star (1-5). Returned by `reviewStats($productId)`.",
2899
+ "variables": [],
2900
+ "fragmentRefs": [],
2901
+ "body": "fragment ReviewStats on ReviewStats {\n averageRating\n totalCount\n fiveStarCount\n fourStarCount\n threeStarCount\n twoStarCount\n oneStarCount\n}",
2902
+ "onType": "ReviewStats"
2903
+ },
2904
+ {
2905
+ "name": "WishlistItem",
2906
+ "kind": "fragment",
2907
+ "section": "Wishlists",
2908
+ "description": "One item in a wishlist — references the product and (optionally) a specific variant, snapshots the price at the time it was added, plus notification preferences (`notifyOnSale`, `notifyOnRestock`).",
2909
+ "variables": [],
2910
+ "fragmentRefs": [
2911
+ "Money",
2912
+ "ProductCard"
2913
+ ],
2914
+ "body": "fragment WishlistItem on WishlistItem {\n id\n productId\n variantId\n product {\n ...ProductCard\n }\n priceWhenAdded {\n ...Money\n }\n notifyOnSale\n notifyOnRestock\n addedAt\n}",
2915
+ "onType": "WishlistItem"
2916
+ },
2917
+ {
2918
+ "name": "Wishlist",
2919
+ "kind": "fragment",
2920
+ "section": "Wishlists",
2921
+ "description": "A customer's wishlist — name, public/private flag, share token (when public), items, item count. Spread on the wishlists page.",
2922
+ "variables": [],
2923
+ "fragmentRefs": [
2924
+ "WishlistItem"
2925
+ ],
2926
+ "body": "fragment Wishlist on Wishlist {\n id\n name\n isPublic\n shareToken\n items {\n ...WishlistItem\n }\n itemCount\n createdAt\n updatedAt\n}",
2927
+ "onType": "Wishlist"
2928
+ },
2929
+ {
2930
+ "name": "BlogCategory",
2931
+ "kind": "fragment",
2932
+ "section": "Blog",
2933
+ "description": "Blog category — name, slug, description, post count. Spread on category navigation and post category labels.",
2934
+ "variables": [],
2935
+ "fragmentRefs": [],
2936
+ "body": "fragment BlogCategory on BlogCategory {\n id\n name\n slug\n description\n postCount\n}",
2937
+ "onType": "BlogCategory"
2938
+ },
2939
+ {
2940
+ "name": "BlogTag",
2941
+ "kind": "fragment",
2942
+ "section": "Blog",
2943
+ "description": "Blog tag — name, slug, post count. Spread on tag clouds and post tag labels.",
2944
+ "variables": [],
2945
+ "fragmentRefs": [],
2946
+ "body": "fragment BlogTag on BlogTag {\n id\n name\n slug\n postCount\n}",
2947
+ "onType": "BlogTag"
2948
+ },
2949
+ {
2950
+ "name": "BlogPost",
2951
+ "kind": "fragment",
2952
+ "section": "Blog",
2953
+ "description": "Full blog post — title, slug, excerpt, content (with `contentFormat` indicating HTML/Markdown), featured image, author, category, tags, publish date, reading time, view + comment counts, SEO metadata. Spread on the post detail page.",
2954
+ "variables": [],
2955
+ "fragmentRefs": [
2956
+ "BlogCategory",
2957
+ "BlogTag",
2958
+ "ImageCard",
2959
+ "ImageThumbnail"
2960
+ ],
2961
+ "body": "fragment BlogPost on BlogPost {\n id\n title\n slug\n excerpt\n content\n contentFormat\n featuredImage {\n ...ImageCard\n }\n author {\n id\n name\n bio\n avatar {\n ...ImageThumbnail\n }\n }\n category {\n ...BlogCategory\n }\n tags {\n ...BlogTag\n }\n publishedAt\n readingTimeMinutes\n viewCount\n commentCount\n allowComments\n isFeatured\n status\n seo {\n title\n description\n }\n createdAt\n updatedAt\n}",
2962
+ "onType": "BlogPost"
2963
+ },
2964
+ {
2965
+ "name": "ProductRecommendation",
2966
+ "kind": "fragment",
2967
+ "section": "Recommendations",
2968
+ "description": "One recommended product — the product itself (card-level), recommendation type (e.g. SIMILAR / FREQUENTLY_BOUGHT_TOGETHER), score (0-100), human reason text. Spread on PDP \"You may also like\" sections.",
2969
+ "variables": [],
2970
+ "fragmentRefs": [
2971
+ "ProductCard"
2972
+ ],
2973
+ "body": "fragment ProductRecommendation on ProductRecommendation {\n product {\n ...ProductCard\n }\n type\n score\n reason\n}",
2974
+ "onType": "ProductRecommendation"
2975
+ },
2976
+ {
2977
+ "name": "CartRecommendation",
2978
+ "kind": "fragment",
2979
+ "section": "Recommendations",
2980
+ "description": "Recommendations bundle for the cart drawer — `frequentlyBoughtTogether` (cross-sell) and `youMayAlsoLike` (related). Each entry has the same shape as `ProductRecommendation`.",
2981
+ "variables": [],
2982
+ "fragmentRefs": [
2983
+ "ProductCard"
2984
+ ],
2985
+ "body": "fragment CartRecommendation on CartRecommendations {\n frequentlyBoughtTogether {\n product {\n ...ProductCard\n }\n type\n score\n reason\n }\n youMayAlsoLike {\n product {\n ...ProductCard\n }\n type\n score\n reason\n }\n}",
2986
+ "onType": "CartRecommendations"
2987
+ },
2988
+ {
2989
+ "name": "LocationAddress",
2990
+ "kind": "fragment",
2991
+ "section": "Store Availability (BOPIS / multi-location)",
2992
+ "description": "Field-access notes: - `isAvailable` — always public. - `pickupTime` — public, localized merchant-configured string. - `availableStock` — token-gated (null for anonymous, integer for authenticated customers). - `location` — public, includes coords + business hours when configured. Physical location address — street, city, country, state, postal code, phone, lat/lng, formatted single-line representation. Spread inside `Location.address`.",
2993
+ "variables": [],
2994
+ "fragmentRefs": [],
2995
+ "body": "fragment LocationAddress on LocationAddress {\n streetLine1\n streetLine2\n city\n country\n countryCode\n state\n stateCode\n postalCode\n phone\n latitude\n longitude\n formatted\n}",
2996
+ "onType": "LocationAddress"
2997
+ },
2998
+ {
2999
+ "name": "BusinessHoursWindow",
3000
+ "kind": "fragment",
3001
+ "section": "Store Availability (BOPIS / multi-location)",
3002
+ "description": "One day's open/close window inside `BusinessHours` (24h clock).",
3003
+ "variables": [],
3004
+ "fragmentRefs": [],
3005
+ "body": "fragment BusinessHoursWindow on BusinessHoursWindow {\n openHour\n closeHour\n}",
3006
+ "onType": "BusinessHoursWindow"
3007
+ },
3008
+ {
3009
+ "name": "BusinessHours",
3010
+ "kind": "fragment",
3011
+ "section": "Store Availability (BOPIS / multi-location)",
3012
+ "description": "Weekly business hours — one window per day. Spread inside `Location.businessHours`.",
3013
+ "variables": [],
3014
+ "fragmentRefs": [
3015
+ "BusinessHoursWindow"
3016
+ ],
3017
+ "body": "fragment BusinessHours on BusinessHours {\n monday {\n ...BusinessHoursWindow\n }\n tuesday {\n ...BusinessHoursWindow\n }\n wednesday {\n ...BusinessHoursWindow\n }\n thursday {\n ...BusinessHoursWindow\n }\n friday {\n ...BusinessHoursWindow\n }\n saturday {\n ...BusinessHoursWindow\n }\n sunday {\n ...BusinessHoursWindow\n }\n}",
3018
+ "onType": "BusinessHours"
3019
+ },
3020
+ {
3021
+ "name": "Location",
3022
+ "kind": "fragment",
3023
+ "section": "Store Availability (BOPIS / multi-location)",
3024
+ "description": "Physical store / pickup location — name, type (RETAIL / WAREHOUSE / PICKUP_POINT), address, business hours, pickup support flag + instructions, timezone. Spread on the store picker and location detail pages.",
3025
+ "variables": [],
3026
+ "fragmentRefs": [
3027
+ "BusinessHours",
3028
+ "LocationAddress"
3029
+ ],
3030
+ "body": "fragment Location on Location {\n id\n name\n type\n supportsPickup\n timezone\n pickupInstructions\n address {\n ...LocationAddress\n }\n businessHours {\n ...BusinessHours\n }\n}",
3031
+ "onType": "Location"
3032
+ },
3033
+ {
3034
+ "name": "StoreAvailability",
3035
+ "kind": "fragment",
3036
+ "section": "Store Availability (BOPIS / multi-location)",
3037
+ "description": "Per-location stock entry for one variant — availability flag, stock quantity (token-gated), pickup time, full location detail. Spread inside `StoreAvailabilityConnection.edges[].node`.",
3038
+ "variables": [],
3039
+ "fragmentRefs": [
3040
+ "Location"
3041
+ ],
3042
+ "body": "fragment StoreAvailability on StoreAvailability {\n isAvailable\n availableStock\n pickupTime\n location {\n ...Location\n }\n}",
3043
+ "onType": "StoreAvailability"
3044
+ },
3045
+ {
3046
+ "name": "StoreAvailabilityConnection",
3047
+ "kind": "fragment",
3048
+ "section": "Store Availability (BOPIS / multi-location)",
3049
+ "description": "Relay connection of `StoreAvailability` entries for a variant — used inside the `VariantStoreAvailability` fragment. Pre-paginated to 10 by default.",
3050
+ "variables": [],
3051
+ "fragmentRefs": [
3052
+ "PageInfo",
3053
+ "StoreAvailability"
3054
+ ],
3055
+ "body": "fragment StoreAvailabilityConnection on StoreAvailabilityConnection {\n totalCount\n pageInfo {\n ...PageInfo\n }\n edges {\n cursor\n node {\n ...StoreAvailability\n }\n }\n}",
3056
+ "onType": "StoreAvailabilityConnection"
3057
+ },
3058
+ {
3059
+ "name": "VariantStoreAvailability",
3060
+ "kind": "fragment",
3061
+ "section": "Store Availability (BOPIS / multi-location)",
3062
+ "description": "Slim variant projection optimized for the store-picker UI — id, title, sku, isAvailable, total `availableStock` plus per-location `storeAvailability` connection. Use in `productStoreAvailability` query.",
3063
+ "variables": [],
3064
+ "fragmentRefs": [
3065
+ "StoreAvailabilityConnection"
3066
+ ],
3067
+ "body": "fragment VariantStoreAvailability on ProductVariant {\n id\n title\n sku\n isAvailable\n availableStock\n storeAvailability(first: 10) {\n ...StoreAvailabilityConnection\n }\n}",
3068
+ "onType": "ProductVariant"
3069
+ },
3070
+ {
3071
+ "name": "ShopPage",
3072
+ "kind": "fragment",
3073
+ "section": "Pages",
3074
+ "description": "CMS page — handle (URL slug), title, body (HTML), excerpt, SEO metadata, publish date. Spread on About / Privacy / Terms / Returns Policy pages.",
3075
+ "variables": [],
3076
+ "fragmentRefs": [],
3077
+ "body": "fragment ShopPage on ShopPage {\n id\n handle\n title\n body\n excerpt\n seo {\n title\n description\n }\n publishedAt\n createdAt\n updatedAt\n}",
3078
+ "onType": "ShopPage"
3079
+ },
3080
+ {
3081
+ "name": "MenuItem",
3082
+ "kind": "fragment",
3083
+ "section": "Navigation Menus",
3084
+ "description": "One menu item with up to 3 levels of nested children — title, URL, type (`HTTP` / `FRONTPAGE` / `SEARCH` / `CATALOG` / `BLOG` / `PRODUCT` / `COLLECTION` / `CATEGORY` / `PAGE`), `resourceId` for typed items, optional image. Switch on `type` to render the right link target.",
3085
+ "variables": [],
3086
+ "fragmentRefs": [
3087
+ "Image"
3088
+ ],
3089
+ "body": "fragment MenuItem on MenuItem {\n id\n title\n url\n type\n resourceId\n image {\n ...Image\n }\n items {\n id\n title\n url\n type\n resourceId\n items {\n id\n title\n url\n type\n resourceId\n }\n }\n}",
3090
+ "onType": "MenuItem"
3091
+ },
3092
+ {
3093
+ "name": "Menu",
3094
+ "kind": "fragment",
3095
+ "section": "Navigation Menus",
3096
+ "description": "Navigation menu — handle (e.g. \"main-menu\", \"footer\", \"mobile\"), title, nested item tree. Returned by `menu($handle)` query.",
3097
+ "variables": [],
3098
+ "fragmentRefs": [
3099
+ "MenuItem"
3100
+ ],
3101
+ "body": "fragment Menu on Menu {\n id\n handle\n title\n items {\n ...MenuItem\n }\n}",
3102
+ "onType": "Menu"
3103
+ },
3104
+ {
3105
+ "name": "UrlRedirect",
3106
+ "kind": "fragment",
3107
+ "section": "URL Redirects",
3108
+ "description": "Single legacy `path` → new `target` redirect entry. Use on the server / edge to issue 301 redirects for migrated routes.",
3109
+ "variables": [],
3110
+ "fragmentRefs": [],
3111
+ "body": "fragment UrlRedirect on UrlRedirect {\n path\n target\n}",
3112
+ "onType": "UrlRedirect"
3113
+ },
3114
+ {
3115
+ "name": "LinkedVariantSummary",
3116
+ "kind": "fragment",
3117
+ "section": "Product Configurator (per-product attributes)",
3118
+ "description": "Slim variant snapshot linked from a configurator option — when an attribute option (e.g. \"256 GB\" storage) maps to a specific variant, this fragment exposes that variant's id, title, sku, stock flags. Spread inside `ProductAttributeOption.linkedVariant`.",
3119
+ "variables": [],
3120
+ "fragmentRefs": [],
3121
+ "body": "fragment LinkedVariantSummary on LinkedVariantSummary {\n id\n productId\n title\n sku\n availableStock\n isAvailable\n trackQuantity\n}",
3122
+ "onType": "LinkedVariantSummary"
3123
+ },
3124
+ {
3125
+ "name": "ProductAttributeOption",
3126
+ "kind": "fragment",
3127
+ "section": "Product Configurator (per-product attributes)",
3128
+ "description": "One option (choice) within a configurator attribute — value, label, sort order, optional color hex, surcharge (amount + type), default flag, optional linked variant for variant-mapped options.",
3129
+ "variables": [],
3130
+ "fragmentRefs": [
3131
+ "LinkedVariantSummary"
3132
+ ],
3133
+ "body": "fragment ProductAttributeOption on ProductAttributeOption {\n id\n value\n label\n sortOrder\n colorHex\n surchargeAmount\n surchargeType\n isDefault\n linkedVariantId\n linkedVariant {\n ...LinkedVariantSummary\n }\n}",
3134
+ "onType": "ProductAttributeOption"
3135
+ },
3136
+ {
3137
+ "name": "ProductAttributeDefinition",
3138
+ "kind": "fragment",
3139
+ "section": "Product Configurator (per-product attributes)",
3140
+ "description": "Configurator attribute definition — name, type, fillingMode (CUSTOMER / MERCHANT / BOTH), billingMode, tax class, validation bounds, options (for choice-type attributes), required + visibility flags. Returned by `product.attributes(filter)` for the configurator UI.",
3141
+ "variables": [],
3142
+ "fragmentRefs": [
3143
+ "ProductAttributeOption"
3144
+ ],
3145
+ "body": "fragment ProductAttributeDefinition on ProductAttributeDefinition {\n id\n name\n slug\n description\n type\n fillingMode\n billingMode\n taxClassId\n scopeProductId\n isRequired\n isVisible\n displayOrder\n minValue\n maxValue\n options {\n ...ProductAttributeOption\n }\n}",
3146
+ "onType": "ProductAttributeDefinition"
3147
+ }
3148
+ ]
3149
+ }