Queries
Everything a storefront can read.
Shop-scoped: the token names the shop and nothing here takes a shop argument. A field returning null means the object is not published to this storefront, which is not distinguishable from its never having existed — deliberately, since a public token must not be able to probe for drafts.
Shop!
The shop this token belongs to.
Takes no argument: the token names the shop, and there is no way to ask for another one.
localization
Section titled “localization”Localization!
Which locale this operation resolved in, and which are available.
Worth reading on first load even in a single-locale shop, because it carries the text direction a layout depends on.
provinces
Section titled “provinces”[Province!]!
Every Iranian province — استان.
A fixed dataset that changes about once a decade. Fetch it once and cache it for as long as your build allows.
Returned whole rather than paged: thirty-one entries is not a collection that needs a cursor, and making every client page a constant is ceremony.
province
Section titled “province”Province
One province by its code.
| Argument | Type | Meaning |
|---|---|---|
code | String! | No description. |
cities
Section titled “cities”[City!]!
The cities of one province — شهر.
query filters by name for a type-ahead. Requires a province: the national
list runs to thousands of entries and no address form needs it whole, and one
province’s worth always fits in a single response.
| Argument | Type | Meaning |
|---|---|---|
provinceCode | String! | No description. |
query | String | No description. |
product
Section titled “product”Product
One product, by id or by handle. Supply exactly one.
Null when it does not exist, is not published, or was unpublished since the link was made — the three are not distinguished, because distinguishing them tells a public caller what a merchant is preparing to launch.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | Handle | No description. |
products
Section titled “products”ProductConnection!
Published products.
query is a full-text search across title, description, vendor, and tags,
Persian-normalized. For a search page, prefer search — it spans content
types and returns facets and a spelling suggestion. This is for a listing.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
query | String | No description. |
filters | [ProductFilter!] | Narrow to products matching every filter. Combines with query: both apply, and the result is what satisfies the text and the facets. |
sortKey | ProductSortKeys · default "BEST_SELLING" | No description. |
reverse | Boolean · default false | No description. |
collection
Section titled “collection”Collection
One collection, by id or by handle. Supply exactly one.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | Handle | No description. |
collections
Section titled “collections”CollectionConnection!
Published collections.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
query | String | No description. |
sortKey | CollectionSortKeys · default "TITLE" | No description. |
reverse | Boolean · default false | No description. |
taxonomyCategory
Section titled “taxonomyCategory”TaxonomyCategory
One taxonomy category, by id or by handle. Supply exactly one.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | Handle | No description. |
rootTaxonomyCategories
Section titled “rootTaxonomyCategories”[TaxonomyCategory!]!
The top of the taxonomy, for building a category tree.
Only categories this shop has published products in — a menu of empty categories is worse than no menu.
productRecommendations
Section titled “productRecommendations”[Product!]!
Products to show alongside another one.
Returned as a plain list rather than a connection: recommendations are a small fixed set chosen by the platform, not a collection anyone pages through.
The selection is behavioural and rule-based, and how it is made may improve behind this field — the same field, better answers, no change to any theme that already calls it.
| Argument | Type | Meaning |
|---|---|---|
productId | ID! | No description. |
intent | ProductRecommendationIntent · default "RELATED" | No description. |
limit | Int · default 8 | No description. |
search
Section titled “search”SearchResultConnection!
Search the storefront.
Persian normalization — ZWNJ, ي→ی, ك→ک, digit folding, Finglish — happens server-side. Send what the buyer typed, unaltered.
| Argument | Type | Meaning |
|---|---|---|
query | String! | No description. |
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
types | [SearchableType!] · default ["PRODUCT"] | Which kinds of thing to search. Widening this widens the result union, so a client that renders only products should not ask for the other three. |
productFilters | [ProductFilter!] | Facets to apply to the product results. Named productFilters and not filters because they narrow one member of the union and leave the rest alone: a price filter cannot mean anything to a page or an article, and silently dropping those from a mixed search would be the wrong reading of it. |
sortKey | SearchSortKeys · default "RELEVANCE" | No description. |
reverse | Boolean · default false | No description. |
includeUnavailable | Boolean · default true | Whether to include products that cannot be bought right now. True by default, and deliberately: a buyer searching for a thing by name wants to be told the shop has it and it is out of stock, not that the shop has never heard of it. Set it false for a picker that must only offer what can be added to a cart. |
predictiveSearch
Section titled “predictiveSearch”PredictiveSearchResult!
Suggestions for a search box, as the buyer types.
Cheap, fast, unpaginated. Debounce it; do not call it per keystroke.
| Argument | Type | Meaning |
|---|---|---|
query | String! | No description. |
limit | Int · default 5 | Suggestions per type, not in total. |
types | [SearchableType!] · default ["PRODUCT"] | Which kinds of thing to suggest. Each is returned in its own list. |
Cart
A cart by id.
Null when it never existed, has expired, became an order at checkout, or was given up. All of them mean the same thing to a theme: make a new one. A basket that became an order is not the buyer’s next basket, and a theme that kept it would show the goods just bought and refuse every change to them.
| Argument | Type | Meaning |
|---|---|---|
id | ID! | No description. |
Order
A placed order, by the token hosted checkout returned with the buyer.
The token is a bearer credential for one order and nothing else. Null when it is wrong or has expired.
| Argument | Type | Meaning |
|---|---|---|
token | String! | No description. |
Page
One page, by id or by handle. Supply exactly one.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | Handle | No description. |
PageConnection!
Published pages.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
query | String | No description. |
sortKey | PageSortKeys · default "TITLE" | No description. |
reverse | Boolean · default false | No description. |
Blog
One blog, by id or by handle. Supply exactly one.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | Handle | No description. |
BlogConnection!
Every published blog.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
article
Section titled “article”Article
One article, by id or by blog-and-article handle. Supply exactly one.
An article handle is unique within its blog, not across the shop, which is why addressing one by handle takes both.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | ArticleHandleInput | No description. |
articles
Section titled “articles”ArticleConnection!
Articles across every blog — for a “latest posts” block.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
query | String | No description. |
tag | String | Only articles carrying this tag, matched exactly, across every blog. |
sortKey | ArticleSortKeys · default "PUBLISHED_AT" | No description. |
reverse | Boolean · default true | No description. |
Menu
One navigation menu, by handle.
Null when the merchant has not created one under that handle — which a theme
should render as an absent menu, not as an error. A theme that hard-fails on a
missing footer menu is a theme that breaks on a shop that did not want one.
| Argument | Type | Meaning |
|---|---|---|
handle | Handle! | No description. |
urlRedirect
Section titled “urlRedirect”UrlRedirect
Whether a path has been redirected.
For a headless storefront doing its own routing: ask before rendering a 404. Null when the path is not redirected.
| Argument | Type | Meaning |
|---|---|---|
path | String! | No description. |
metaobject
Section titled “metaobject”Metaobject
One metaobject, by id or by type-and-handle. Supply exactly one.
| Argument | Type | Meaning |
|---|---|---|
id | ID | No description. |
handle | MetaobjectHandleInput | No description. |
metaobjects
Section titled “metaobjects”MetaobjectConnection!
Every published metaobject of one type.
| Argument | Type | Meaning |
|---|---|---|
type | String! | No description. |
first | Int | No description. |
after | String | No description. |
last | Int | No description. |
before | String | No description. |
sortKey | MetaobjectSortKeys · default "POSITION" | No description. |
reverse | Boolean · default false | No description. |
Node
Re-fetch any object by its id.
What makes a normalizing client cache work: after a mutation, the cache refreshes exactly the objects that changed rather than re-running the query that produced them.
| Argument | Type | Meaning |
|---|---|---|
id | ID! | No description. |
[Node]!
Re-fetch several objects at once.
Positional: one entry per id, in the order asked, null where there is nothing to return.
| Argument | Type | Meaning |
|---|---|---|
ids | [ID!]! | No description. |