GitHub

ShopifyProduct

interface

import { ShopifyProduct } from '@daffodil/driver/shopify'

The Product object lets you manage products in a merchant’s store.

Products are the goods and services that merchants offer to customers. They can include various details such as title, description, price, images, and options such as size or color. You can use product variants to create or update different versions of the same product. You can also add or update product media. Products can be organized by grouping them into a collection.

Learn more about working with products and collections.

interface ShopifyProduct {
  __typename: "Product"
  availableForSale: boolean
  collections: ShopifyCollectionConnection
  compareAtPriceRange: ShopifyProductPriceRange
  createdAt: Scalars['DateTime']['output']
  description: string
  descriptionHtml: Scalars['HTML']['output']
  featuredImage: ShopifyImage
  handle: string
  id: string
  images: ShopifyImageConnection
  isGiftCard: boolean
  media: ShopifyMediaConnection
  metafield: ShopifyMetafield
  metafields: ShopifyMetafield[]
  onlineStoreUrl: Maybe<Scalars['URL']['output']>
  options: ShopifyProductOption[]
  priceRange: ShopifyProductPriceRange
  productType: string
  publishedAt: Scalars['DateTime']['output']
  requiresSellingPlan: boolean
  sellingPlanGroups: ShopifySellingPlanGroupConnection
  seo: ShopifySeo
  tags: string[]
  title: string
  totalInventory: number
  trackingParameters: string
  updatedAt: Scalars['DateTime']['output']
  variantBySelectedOptions: ShopifyProductVariant
  variants: ShopifyProductVariantConnection
  vendor: string
}

Properties

__typename
"Product"
availableForSale
boolean

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

collections
ShopifyCollectionConnection

A list of collections that include the product.

compareAtPriceRange
ShopifyProductPriceRange

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

createdAt
Scalars['DateTime']['output']

The date and time when the product was created.

description
string

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

descriptionHtml
Scalars['HTML']['output']

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

featuredImage
ShopifyImage

The featured image for the product.

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

handle
string

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
string

A globally-unique ID.

images
ShopifyImageConnection

List of images associated with the product.

isGiftCard
boolean

Whether the product is a gift card.

media
ShopifyMediaConnection

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

metafield
ShopifyMetafield

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

metafields
ShopifyMetafield[]

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

onlineStoreUrl
Maybe<Scalars['URL']['output']>

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

options
ShopifyProductOption[]

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

priceRange
ShopifyProductPriceRange

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.

productType
string

The product type that merchants define.

publishedAt
Scalars['DateTime']['output']

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

requiresSellingPlan
boolean

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.

sellingPlanGroups
ShopifySellingPlanGroupConnection

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

seo
ShopifySeo

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

tags
string[]

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.

title
string

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.

totalInventory
number

The quantity of inventory that's in stock.

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

updatedAt
Scalars['DateTime']['output']

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.

variantBySelectedOptions
ShopifyProductVariant

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.

variants
ShopifyProductVariantConnection

A list of variants that are associated with the product.

vendor
string

The name of the product's vendor.