Product

Required access

read_products access scope

Show definition
type Product implements Node, Navigable, HasMetafields, Publishable, OnlineStorePreviewable {
  # Globally unique identifier.
  id: ID!

  # A default cursor for use in pagination.
  defaultCursor: String!

  # The metafield associated with the resource.
  metafield(
    # Container for a set of metafields (maximum of 20 characters).
    namespace: String!

    # Identifier for the metafield (maximum of 30 characters).
    key: String!
  ): Metafield

  # A paginated list of metafields associated with the resource.
  metafields(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): MetafieldConnection!

  # The number of channels a resource is published on without feedback errors.
  availablePublicationCount: Int!

  # The number of channels a resource is published on.
  publicationCount(
    # Include only the resource's publications that are published. If false it
    # will return all resource's publications including future publications.
    onlyPublished: Boolean = true
  ): Int!

  # The list of resources that are published to a channel.
  publicationsV2(
    # Return only the resources that are published. If false it will return all resource's publications.
    onlyPublished: Boolean = true

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): PublicationConnection!

  # Check to see if resource is published to a given channel.
  publishedOnChannel(
    # The ID of the channel to check.
    channelId: ID!
  ): Boolean!

  # Check to see if resource is published to the calling app's channel.
  publishedOnCurrentChannel: Boolean!

  # The list of channels that the resource is not published to.
  unpublishedChannels(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ChannelConnection!

  # The online store preview URL.
  onlineStorePreviewUrl: URL

  # The description of the product, complete with HTML formatting.
  bodyHtml: String

  # A list of the collections that include the product.
  collections(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: CollectionSortKeys = ID

    # Supported filter parameters:
    #  - `title`
    #  - `collection_type`
    #  - `updated_at`
    #  - `published_status`
    query: String
  ): CollectionConnection!

  # The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was created.
  createdAt: DateTime!

  # Stripped description of the product, single line with HTML tags removed.
  description(
    # Truncates string after the given length.
    truncateAt: Int
  ): String!

  # The description of the product, complete with HTML formatting.
  descriptionHtml: HTML!

  # Stripped description of the product, single line with HTML tags removed.
  # Truncated to 60 characters.
  descriptionPlainSummary: String!

  # Information about the product that's provided through resource feedback.
  feedback: ResourceFeedback

  # The theme template used when viewing the gift card in a store.
  giftCardTemplateSuffix: String

  # A unique human-friendly string for the product. Automatically generated from the product's title.
  handle: String!

  # Whether the product has only a single variant with the default option and value.
  hasOnlyDefaultVariant: Boolean!

  # Whether the product has out of stock variants.
  hasOutOfStockVariants: Boolean!

  # The images associated with the product.
  images(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: ProductImageSortKeys = POSITION

    # Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead.
    maxWidth: Int

    # Image height in pixels between 1 and 2048. This argument is deprecated: Use
    # `maxHeight` on `Image.transformedSrc` instead.
    maxHeight: Int

    # Crops the image according to the specified region. This argument is
    # deprecated: Use `crop` on `Image.transformedSrc` instead.
    crop: CropRegion

    # Image size multiplier for high-resolution retina displays. Must be between 1
    # and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead.
    scale: Int = 1
  ): ImageConnection!

  # Whether the product is in a given collection.
  inCollection(
    # The ID of the collection to check.
    id: ID!
  ): Boolean!

  # Whether the product is a gift card.
  isGiftCard: Boolean!

  # List of custom product options (maximum of 3 per product).
  options(
    # Truncate the array result to this size.
    first: Int
  ): [ProductOption!]!

  # The price range.
  priceRange: ProductPriceRange!

  # A list of the channels where the product is published.
  productPublications(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ProductPublicationConnection!

  # The product type specified by the merchant.
  productType: String!

  # A list of the channels where the product is published.
  publications(
    # Return only the publications that are published. If false it will return all publications.
    onlyPublished: Boolean = true

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ProductPublicationConnection!

  # The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was published.
  publishedAt: DateTime

  # SEO information of the product.
  seo: SEO!

  # The storefront ID of the product.
  storefrontId: StorefrontID!

  # A list of the tags that have been added to the product.
  tags: [String!]!

  # The theme template used when viewing the product in a store.
  templateSuffix: String

  # The title of the product.
  title: String!

  # The quantity of inventory in stock.
  totalInventory: Int!

  # The number of variants that are associated with this product.
  totalVariants: Int!

  # Whether inventory tracking has been enabled for this product.
  tracksInventory: Boolean!

  # The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was last modified.
  updatedAt: DateTime!

  # A list of variants associated with the product.
  variants(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: ProductVariantSortKeys = POSITION
  ): ProductVariantConnection!

  # The name of the product's vendor.
  vendor: String!
}

Implements

Connections

collections   (CollectionConnection!)

A list of the collections that include the product.

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

query String

Supported filter parameters:

  • title
  • collection_type
  • updated_at
  • published_status
reverse Boolean false

Reverse the order of the underlying list.

sortKey CollectionSortKeys ID

Sort the underlying list by the given key.

images   (ImageConnection!)

The images associated with the product.

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

crop CropRegion

Crops the image according to the specified region. This argument is deprecated: Use crop on Image.transformedSrc instead.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

maxHeight Int

Image height in pixels between 1 and 2048. This argument is deprecated: Use maxHeight on Image.transformedSrc instead.

maxWidth Int

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

reverse Boolean false

Reverse the order of the underlying list.

scale Int 1

Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

sortKey ProductImageSortKeys POSITION

Sort the underlying list by the given key.

metafields   (MetafieldConnection!)

A paginated list of metafields associated with the resource.

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

reverse Boolean false

Reverse the order of the underlying list.

publicationsV2   (PublicationConnection!)

The list of resources that are published to a channel.

Required access

read_channels access scope

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

onlyPublished Boolean true

Return only the resources that are published. If false it will return all resource's publications.

reverse Boolean false

Reverse the order of the underlying list.

unpublishedChannels   (ChannelConnection!)

The list of channels that the resource is not published to.

Required access

read_channels access scope

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

reverse Boolean false

Reverse the order of the underlying list.

variants   (ProductVariantConnection!)

A list of variants associated with the product.

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

reverse Boolean false

Reverse the order of the underlying list.

sortKey ProductVariantSortKeys POSITION

Sort the underlying list by the given key.

Fields

availablePublicationCount   (Int!)

The number of channels a resource is published on without feedback errors.

Required access

read_channels access scope

createdAt   (DateTime!)

The date and time (ISO 8601 format) when the product was created.

defaultCursor   (String!)

A default cursor for use in pagination.

description   (String!)

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

Argument Type Default Description
truncateAt Int

Truncates string after the given length.

descriptionHtml   (HTML!)

The description of the product, complete with HTML formatting.

feedback   (ResourceFeedback)

Information about the product that's provided through resource feedback.

giftCardTemplateSuffix   (String)

The theme template used when viewing the gift card in a store.

handle   (String!)

A unique human-friendly string for the product. Automatically generated from the product's title.

hasOnlyDefaultVariant   (Boolean!)

Whether the product has only a single variant with the default option and value.

hasOutOfStockVariants   (Boolean!)

Whether the product has out of stock variants.

id   (ID!)

Globally unique identifier.

inCollection   (Boolean!)

Whether the product is in a given collection.

Argument Type Default Description
id required ID!

The ID of the collection to check.

isGiftCard   (Boolean!)

Whether the product is a gift card.

metafield   (Metafield)

The metafield associated with the resource.

Argument Type Default Description
key required String!

Identifier for the metafield (maximum of 30 characters).

namespace required String!

Container for a set of metafields (maximum of 20 characters).

onlineStorePreviewUrl   (URL)

The online store preview URL.

options   ([ProductOption!]!)

List of custom product options (maximum of 3 per product).

Argument Type Default Description
first Int

Truncate the array result to this size.

priceRange   (ProductPriceRange!)

The price range.

productType   (String!)

The product type specified by the merchant.

publicationCount   (Int!)

The number of channels a resource is published on.

Required access

read_channels access scope

Argument Type Default Description
onlyPublished Boolean true

Include only the resource's publications that are published. If false it will return all resource's publications including future publications.

publishedOnChannel   (Boolean!)

Check to see if resource is published to a given channel.

Required access

read_channels access scope

Argument Type Default Description
channelId required ID!

The ID of the channel to check.

publishedOnCurrentChannel   (Boolean!)

Check to see if resource is published to the calling app's channel.

Required access

read_product_listings access scope

seo   (SEO!)

SEO information of the product.

storefrontId   (StorefrontID!)

The storefront ID of the product.

tags   ([String!]!)

A list of the tags that have been added to the product.

templateSuffix   (String)

The theme template used when viewing the product in a store.

title   (String!)

The title of the product.

totalInventory   (Int!)

The quantity of inventory in stock.

totalVariants   (Int!)

The number of variants that are associated with this product.

tracksInventory   (Boolean!)

Whether inventory tracking has been enabled for this product.

updatedAt   (DateTime!)

The date and time (ISO 8601 format) when the product was last modified.

vendor   (String!)

The name of the product's vendor.

Deprecated fields

Show/Hide

bodyHtml   (String) deprecated

The description of the product, complete with HTML formatting.

Deprecation warning

Use descriptionHtml instead

descriptionPlainSummary   (String!) deprecated

Stripped description of the product, single line with HTML tags removed. Truncated to 60 characters.

Deprecation warning

Use description instead

productPublications   (ProductPublicationConnection!) deprecated

A list of the channels where the product is published.

Deprecation warning

Use publicationsV2 instead

Required access

read_channels access scope

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

reverse Boolean false

Reverse the order of the underlying list.

publications   (ProductPublicationConnection!) deprecated

A list of the channels where the product is published.

Deprecation warning

Use publicationsV2 instead

Required access

read_channels access scope

Argument Type Default Description
after String

Returns the elements that come after the specified cursor.

before String

Returns the elements that come before the specified cursor.

first Int

Returns up to the first n elements from the list.

last Int

Returns up to the last n elements from the list.

onlyPublished Boolean true

Return only the publications that are published. If false it will return all publications.

reverse Boolean false

Reverse the order of the underlying list.

publishedAt   (DateTime) deprecated

The date and time (ISO 8601 format) when the product was published.

Deprecation warning

Use publications instead