Product

Required access

read_products access scope

Represents a product, including information about related collections and product variants.

Show definition
# Represents a product, including information about related collections and product variants.
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 resources that are published to a channel.
  resourcePublications(
    # Return only the resources that are published. If false it will return all resource 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
  ): ResourcePublicationConnection!

  # 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 to the Online Store.
  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.

Required access

read_ 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.

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.

Required access

read_ 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.

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.

Required access

read_ 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.

resourcePublications   (ResourcePublicationConnection!)

The list of resources that are published to a channel.

Required access

read_publications 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 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_publications 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.

Required access

read_ 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.

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_publications access scope

createdAt   (DateTime!)

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

Required access

read_ access scope

defaultCursor   (String!)

A default cursor for use in pagination.

Required access

read_ access scope

description   (String!)

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

Required access

read_ access scope

Argument Type Default Description
truncateAt

Int

Truncates string after the given length.

descriptionHtml   (HTML!)

The description of the product, complete with HTML formatting.

Required access

read_ access scope

feedback   (ResourceFeedback)

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

Required access

read_ access scope

giftCardTemplateSuffix   (String)

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

Required access

read_ access scope

handle   (String!)

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

Required access

read_ access scope

hasOnlyDefaultVariant   (Boolean!)

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

Required access

read_ access scope

hasOutOfStockVariants   (Boolean!)

Whether the product has out of stock variants.

Required access

read_ access scope

id   (ID!)

Globally unique identifier.

Required access

read_ access scope

inCollection   (Boolean!)

Whether the product is in a given collection.

Required access

read_ access scope

Argument Type Default Description
id

required

ID!

The ID of the collection to check.

isGiftCard   (Boolean!)

Whether the product is a gift card.

Required access

read_ access scope

metafield   (Metafield)

The metafield associated with the resource.

Required access

read_ access scope

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.

Required access

read_ access scope

options   ([ProductOption!]!)

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

Required access

read_ access scope

Argument Type Default Description
first

Int

Truncate the array result to this size.

priceRange   (ProductPriceRange!)

The price range.

Required access

read_ access scope

productType   (String!)

The product type specified by the merchant.

Required access

read_ access scope

publicationCount   (Int!)

The number of channels a resource is published on.

Required access

read_publications 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.

publishedAt   (DateTime)

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

Required access

read_ access scope

publishedOnChannel   (Boolean!)

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

Required access

read_publications 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.

Required access

read_ access scope

storefrontId   (StorefrontID!)

The storefront ID of the product.

Required access

read_ access scope

tags   ([String!]!)

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

Required access

read_ access scope

templateSuffix   (String)

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

Required access

read_ access scope

title   (String!)

The title of the product.

Required access

read_ access scope

totalInventory   (Int!)

The quantity of inventory in stock.

Required access

read_ access scope

totalVariants   (Int!)

The number of variants that are associated with this product.

Required access

read_ access scope

tracksInventory   (Boolean!)

Whether inventory tracking has been enabled for this product.

Required access

read_ access scope

updatedAt   (DateTime!)

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

Required access

read_ access scope

vendor   (String!)

The name of the product's vendor.

Required access

read_ access scope

Deprecated fields

Show/Hide

bodyHtml   (String)

deprecated

The description of the product, complete with HTML formatting.

Deprecation warning

Use descriptionHtml instead

Required access

read_ access scope

descriptionPlainSummary   (String!)

deprecated

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

Deprecation warning

Use description instead

Required access

read_ access scope

productPublications   (ProductPublicationConnection!)

deprecated

A list of the channels where the product is published.

Deprecation warning

Use publicationsV2 instead

Required access

read_publications 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_publications 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.

publicationsV2   (PublicationConnection!)

deprecated

The list of resources that are published to a channel.

Deprecation warning

Use resourcePublications instead

Required access

read_publications 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.

Sign up for a Partner account to get started.

Sign up