Skip to main content
union

The list of possible resources a MenuItem can reference.

Anchor to ArticleArticle
•OBJECT

A post that belongs to a Blog. Each article includes content with optional HTML formatting, an excerpt for previews, ArticleAuthor information, and an associated Image.

Articles can be organized with tags and include SEO metadata. You can manage comments when the blog's comment policy enables them.

•ArticleAuthor

The article's author.

•Blog!
non-null

The blog that the article belongs to.

•CommentConnection!
non-null

List of comments posted on the article.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•String!
non-null

Stripped content of the article, single line with HTML tags removed.

Arguments

•Int

Truncates a string after the given length.


•HTML!
non-null

The content of the article, complete with HTML formatting.

•String

Stripped excerpt of the article, single line with HTML tags removed.

Arguments

•Int

Truncates a string after the given length.


•HTML

The excerpt of the article, complete with HTML formatting.

•String!
non-null

A human-friendly unique string for the Article automatically generated from its title.

•ID!
non-null

A globally-unique ID.

•Image

The image associated with the article.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The identifier for the metafield.


•[Metafield]!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•[HasMetafieldsIdentifier!]!
required

The list of metafields to retrieve by namespace and key.

The input must not contain more than 250 values.


•URL

The URL used for viewing the resource on the shop's Online Store. Returns null if the resource is currently not published to the Online Store sales channel.

•DateTime!
non-null

The date and time when the article was published.

•SEO

The article’s SEO information.

•[String!]!
non-null

A categorization that a article can be tagged with.

•String!
non-null

The article’s name.

•String

URL parameters to be added to a page URL to track the origin of on-site search traffic for analytics reporting. Returns a result when accessed through the search or predictiveSearch queries, otherwise returns null.

•ArticleAuthor!
non-nullDeprecated
•OBJECT

A blog container for Article objects. Stores can have multiple blogs, for example to organize content by topic or purpose.

Each blog provides access to its articles, contributing ArticleAuthor objects, and SEO information. You can retrieve articles individually by handle or as a paginated list.

•Article

Find an article by its handle.

Arguments

•String!
required

The handle of the article.


•ArticleConnection!
non-null

List of the blog's articles.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ArticleSortKeys
Default:ID

Sort the underlying list by the given key.

•String

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

•
Anchor to blog_title
•
Anchor to created_at
•
•
Anchor to tag_not
•
Anchor to updated_at
•

•[ArticleAuthor!]!
non-null

The authors who have contributed to the blog.

•String!
non-null

A human-friendly unique string for the Blog automatically generated from its title.

•ID!
non-null

A globally-unique ID.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The identifier for the metafield.


•[Metafield]!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•[HasMetafieldsIdentifier!]!
required

The list of metafields to retrieve by namespace and key.

The input must not contain more than 250 values.


•URL

The URL used for viewing the resource on the shop's Online Store. Returns null if the resource is currently not published to the Online Store sales channel.

•SEO

The blog's SEO information.

•String!
non-null

The blogs’s title.

•OBJECT

A group of products organized by a merchant to make their store easier to browse. Collections can help customers discover related products by category, season, promotion, or other criteria.

Query a collection's products with filtering options like availability, price range, vendor, and tags. Each collection includes SEO information, an optional Image, and supports custom data through metafields.

•String!
non-null

Stripped description of the collection, single line with HTML tags removed.

Arguments

•Int

Truncates a string after the given length.


•HTML!
non-null

The description of the collection, complete with HTML formatting.

•String!
non-null

A human-friendly unique string for the collection automatically generated from its title. Limit of 255 characters.

•ID!
non-null

A globally-unique ID.

•Image

Image associated with the collection.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The identifier for the metafield.


•[Metafield]!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•[HasMetafieldsIdentifier!]!
required

The list of metafields to retrieve by namespace and key.

The input must not contain more than 250 values.


•URL

The URL used for viewing the resource on the shop's Online Store. Returns null if the resource is currently not published to the Online Store sales channel.

•ProductConnection!
non-null

List of products in the collection.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ProductCollectionSortKeys
Default:COLLECTION_DEFAULT

Sort the underlying list by the given key.

•[ProductFilter!]

Returns a subset of products matching all product filters.

The input must not contain more than 250 values.


•SEO!
non-null

The collection's SEO information.

•String!
non-null

The collection’s name. Limit of 255 characters.

•String

URL parameters to be added to a page URL to track the origin of on-site search traffic for analytics reporting. Returns a result when accessed through the search or predictiveSearch queries, otherwise returns null.

•DateTime!
non-null

The date and time when the collection was last modified.

•OBJECT

An instance of custom structured data defined by a metaobject definition. Metaobjects store reusable content that extends beyond standard Shopify resources, such as size charts, author profiles, or custom content sections.

Each metaobject contains fields that match the types and validation rules specified in its definition. Metafield references can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has the renderable capability, then the seo field provides SEO metadata. If it has the online_store capability, then the onlineStoreUrl field returns the public URL.

•MetaobjectField

Accesses a field of the object by key.

Arguments

•String!
required

The key of the field.


•[MetaobjectField!]!
non-null

All object fields with defined values. Omitted object keys can be assumed null, and no guarantees are made about field order.

•String!
non-null

The unique handle of the metaobject. Useful as a custom ID.

•ID!
non-null

A globally-unique ID.

•URL

The URL used for viewing the metaobject on the shop's Online Store. Returns null if the metaobject definition doesn't have the online_store capability.

•MetaobjectSEO

The metaobject's SEO information. Returns null if the metaobject definition doesn't have the renderable capability.

•String!
non-null

The type of the metaobject.

•DateTime!
non-null

The date and time when the metaobject was last updated.

•OBJECT

A custom content page on a merchant's store. Pages display HTML-formatted content, such as "About Us", contact details, or store policies.

Each page has a unique handle for URL routing and includes SEO information for search engine optimization. Pages support Metafield attachments for storing additional custom data.

•HTML!
non-null

The description of the page, complete with HTML formatting.

•String!
non-null

Summary of the page body.

•DateTime!
non-null

The timestamp of the page creation.

•String!
non-null

A human-friendly unique string for the page automatically generated from its title.

•ID!
non-null

A globally-unique ID.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The identifier for the metafield.


•[Metafield]!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•[HasMetafieldsIdentifier!]!
required

The list of metafields to retrieve by namespace and key.

The input must not contain more than 250 values.


•URL

The URL used for viewing the resource on the shop's Online Store. Returns null if the resource is currently not published to the Online Store sales channel.

•SEO

The page's SEO information.

•String!
non-null

The title of the page.

•String

URL parameters to be added to a page URL to track the origin of on-site search traffic for analytics reporting. Returns a result when accessed through the search or predictiveSearch queries, otherwise returns null.

•DateTime!
non-null

The timestamp of the latest page update.

•OBJECT

Represents an item listed in a shop's catalog.

Products support multiple product variants, representing different versions of the same product, and can include various media types. Use the selectedOrFirstAvailableVariant or variantBySelectedOptions fields to help customers find the right variant based on their selections.

Products can be organized into collections, associated with selling plans for subscriptions, and extended with custom data through metafields.

Learn more about working with products and collections.

•[ProductVariant!]!
non-null

A list of variants whose selected options differ with the provided selected options by one, ordered by variant id. If selected options are not provided, adjacent variants to the first available variant is returned.

Note that this field returns an array of variants. In most cases, the number of variants in this array will be low. However, with a low number of options and a high number of values per option, the number of variants returned here can be high. In such cases, it recommended to avoid using this field.

This list of variants can be used in combination with the options field to build a rich variant picker that includes variant availability or other variant information.

Arguments

•[SelectedOptionInput!]

The input fields used for a selected option.

The input must not contain more than 250 values.

Anchor to ignoreUnknownOptionsignoreUnknownOptions
•Boolean
Default:true

Whether to ignore product options that are not present on the requested product.

Anchor to caseInsensitiveMatchcaseInsensitiveMatch
•Boolean
Default:false

Whether to perform case insensitive match on option names and values.


•Boolean!
non-null

Indicates if at least one product variant is available for sale.

•TaxonomyCategory

The category of a product from Shopify's Standard Product Taxonomy.

•CollectionConnection!
non-null

A list of collections that include the product.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•ProductPriceRange!
non-null

The compare-at price range of the product in the shop's default currency.

•DateTime!
non-null

The date and time when the product was created.

•String!
non-null

A single-line description of the product, with HTML tags removed.

Arguments

•Int

Truncates a string after the given length.


•HTML!
non-null

The description of the product, with HTML tags. For example, the description might include bold <strong></strong> and italic <i></i> text.

Anchor to encodedVariantAvailabilityencodedVariantAvailability
•String

An encoded string containing all option value combinations with a corresponding variant that is currently available for sale.

Integers represent option and values: [0,1] represents option_value at array index 0 for the option at array index 0

:, ,, and - are control characters. : indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2. , indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes. indicates a gap in the sequence of option values. ex: 0 4 indicates option values in position 0 and 4 are present. - indicates a continuous range of option values. ex: 0 1-3 4

Decoding process:

Example options: [Size, Color, Material] Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,,"

Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," Step 4: Map to options + option values to determine existing variants:

[Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0).

Anchor to encodedVariantExistenceencodedVariantExistence
•String

An encoded string containing all option value combinations with a corresponding variant.

Integers represent option and values: [0,1] represents option_value at array index 0 for the option at array index 0

:, ,, and - are control characters. : indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2. , indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes. indicates a gap in the sequence of option values. ex: 0 4 indicates option values in position 0 and 4 are present. - indicates a continuous range of option values. ex: 0 1-3 4

Decoding process:

Example options: [Size, Color, Material] Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,,"

Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," Step 4: Map to options + option values to determine existing variants:

[Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0).

•Image

The featured image for the product.

This field is functionally equivalent to images(first: 1).

•String!
non-null

A unique, human-readable string of the product's title. A handle can contain letters, hyphens (-), and numbers, but no spaces. The handle is used in the online store URL for the product.

•ID!
non-null

A globally-unique ID.

•ImageConnection!
non-null

List of images associated with the product.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ProductImageSortKeys
Default:POSITION

Sort the underlying list by the given key.


•Boolean!
non-null

Whether the product is a gift card.

•MediaConnection!
non-null

The media that are associated with the product. Valid media are images, 3D models, videos.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ProductMediaSortKeys
Default:POSITION

Sort the underlying list by the given key.


•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The identifier for the metafield.


•[Metafield]!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•[HasMetafieldsIdentifier!]!
required

The list of metafields to retrieve by namespace and key.

The input must not contain more than 250 values.


•URL

The product's URL on the online store. If null, then the product isn't published to the online store sales channel.

•[ProductOption!]!
non-null

A list of product options. The limit is defined by the shop's resource limits for product options (Shop.resourceLimits.maxProductOptions).

Arguments

•Int

Truncate the array result to this size.


•ProductPriceRange!
non-null

The minimum and maximum prices of a product, expressed in decimal numbers. For example, if the product is priced between $10.00 and $50.00, then the price range is $10.00 - $50.00.

•String!
non-null

The product type that merchants define.

•DateTime!
non-null

The date and time when the product was published to the channel.

•Boolean!
non-null

Whether the product can only be purchased with a selling plan. Products that are sold on subscription (requiresSellingPlan: true) can be updated only for online stores. If you update a product to be subscription-only (requiresSellingPlan:false), then the product is unpublished from all channels, except the online store.

Anchor to selectedOrFirstAvailableVariantselectedOrFirstAvailableVariant
•ProductVariant

Find an active product variant based on selected options, availability or the first variant.

All arguments are optional. If no selected options are provided, the first available variant is returned. If no variants are available, the first variant is returned.

Arguments

•[SelectedOptionInput!]

The input fields used for a selected option.

The input must not contain more than 250 values.

Anchor to ignoreUnknownOptionsignoreUnknownOptions
•Boolean
Default:true

Whether to ignore unknown product options.

Anchor to caseInsensitiveMatchcaseInsensitiveMatch
•Boolean
Default:false

Whether to perform case insensitive match on option names and values.


•SellingPlanGroupConnection!
non-null

A list of all selling plan groups that are associated with the product either directly, or through the product's variants.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•SEO!
non-null

The SEO title and description that are associated with a product.

•[String!]!
non-null

A comma-separated list of searchable keywords that are associated with the product. For example, a merchant might apply the sports and summer tags to products that are associated with sportwear for summer. Updating tags overwrites any existing tags that were previously added to the product. To add new tags without overwriting existing tags, use the GraphQL Admin API's tagsAdd mutation.

•String!
non-null

The name for the product that displays to customers. The title is used to construct the product's handle. For example, if a product is titled "Black Sunglasses", then the handle is black-sunglasses.

•Int

The quantity of inventory that's in stock.

•String

URL parameters to be added to a page URL to track the origin of on-site search traffic for analytics reporting. Returns a result when accessed through the search or predictiveSearch queries, otherwise returns null.

•DateTime!
non-null

The date and time when the product was last modified. A product's updatedAt value can change for different reasons. For example, if an order is placed for a product that has inventory tracking set up, then the inventory adjustment is counted as an update.

Anchor to variantBySelectedOptionsvariantBySelectedOptions
•ProductVariant

Find a product’s variant based on its selected options. This is useful for converting a user’s selection of product options into a single matching variant. If there is not a variant for the selected options, null will be returned.

Arguments

•[SelectedOptionInput!]!
required

The input fields used for a selected option.

The input must not contain more than 250 values.

Anchor to ignoreUnknownOptionsignoreUnknownOptions
•Boolean
Default:false

Whether to ignore unknown product options.

Anchor to caseInsensitiveMatchcaseInsensitiveMatch
•Boolean
Default:false

Whether to perform case insensitive match on option names and values.


•ProductVariantConnection!
non-null

A list of variants that are associated with the product.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ProductVariantSortKeys
Default:POSITION

Sort the underlying list by the given key.


•Count

The number of variants that are associated with the product.

•String!
non-null

The name of the product's vendor.

•OBJECT

Policy that a merchant has configured for their store, such as their refund or privacy policy.

•String!
non-null

Policy text, maximum size of 64kb.

•String!
non-null

Policy’s handle.

•ID!
non-null

A globally-unique ID.

•String!
non-null

Policy’s title.

•URL!
non-null

Public URL to the policy.


Was this section helpful?

Anchor to Fields with this unionFields with this union

•OBJECT

A navigation link within a Menu. Each item has a title, URL, and can link to store resources like products, collections, pages, blogs, or external URLs.

Menu items support nested hierarchies through the items field, enabling dropdown or multi-level navigation structures. The tags field filters results when the item links to a collection specifically.


Was this section helpful?