diff --git a/lib/bigcommerce/api/fragments/product.ts b/lib/bigcommerce/api/fragments/product.ts index 94753c948..501345cba 100644 --- a/lib/bigcommerce/api/fragments/product.ts +++ b/lib/bigcommerce/api/fragments/product.ts @@ -4,6 +4,9 @@ export const responsiveImageFragment = /* GraphQL */ ` urlMedium: url(width: $imgMediumWidth, height: $imgMediumHeight) urlLarge: url(width: $imgLargeWidth, height: $imgLargeHeight) urlXL: url(width: $imgXLWidth, height: $imgXLHeight) + urlOriginal + altText + isDefault } ` diff --git a/lib/bigcommerce/schema.d.ts b/lib/bigcommerce/schema.d.ts index e281cdaea..42ade6232 100644 --- a/lib/bigcommerce/schema.d.ts +++ b/lib/bigcommerce/schema.d.ts @@ -121,6 +121,33 @@ export type BrandEdge = { cursor: Scalars['String'] } +/** Breadcrumb */ +export type Breadcrumb = { + __typename?: 'Breadcrumb' + /** Category id. */ + entityId: Scalars['Int'] + /** Name of the category. */ + name: Scalars['String'] +} + +/** A connection to a list of items. */ +export type BreadcrumbConnection = { + __typename?: 'BreadcrumbConnection' + /** Information to aid in pagination. */ + pageInfo: PageInfo + /** A list of edges. */ + edges?: Maybe>> +} + +/** An edge in a connection. */ +export type BreadcrumbEdge = { + __typename?: 'BreadcrumbEdge' + /** The item at the end of the edge. */ + node: Breadcrumb + /** A cursor for use in pagination. */ + cursor: Scalars['String'] +} + /** Bulk pricing tier that sets a fixed price for the product or variant. */ export type BulkPricingFixedPriceDiscount = BulkPricingTier & { __typename?: 'BulkPricingFixedPriceDiscount' @@ -197,11 +224,22 @@ export type Category = Node & { defaultImage?: Maybe /** Category description. */ description: Scalars['String'] + /** Category breadcrumbs. */ + breadcrumbs: BreadcrumbConnection products: ProductConnection /** Metafield data related to a category. */ metafields: MetafieldConnection } +/** Category */ +export type CategoryBreadcrumbsArgs = { + depth: Scalars['Int'] + before?: Maybe + after?: Maybe + first?: Maybe + last?: Maybe +} + /** Category */ export type CategoryProductsArgs = { before?: Maybe @@ -408,6 +446,8 @@ export type Image = { __typename?: 'Image' /** Absolute path to image using store CDN. */ url: Scalars['String'] + /** Absolute path to original image using store CDN. */ + urlOriginal: Scalars['String'] /** Text description of an image that can be used for SEO and/or accessibility purposes. */ altText: Scalars['String'] /** Indicates whether this is the primary image. */ @@ -1613,12 +1653,15 @@ export enum CurrencyCode { Zwr = 'ZWR', } -export type ResponsiveImageFragment = { __typename?: 'Image' } & { - urlSmall: Image['url'] - urlMedium: Image['url'] - urlLarge: Image['url'] - urlXL: Image['url'] -} +export type ResponsiveImageFragment = { __typename?: 'Image' } & Pick< + Image, + 'urlOriginal' | 'altText' | 'isDefault' +> & { + urlSmall: Image['url'] + urlMedium: Image['url'] + urlLarge: Image['url'] + urlXL: Image['url'] + } export type ProductInfoFragment = { __typename?: 'Product' } & Pick< Product, diff --git a/lib/bigcommerce/schema.graphql b/lib/bigcommerce/schema.graphql index 72a087b48..79de347fe 100644 --- a/lib/bigcommerce/schema.graphql +++ b/lib/bigcommerce/schema.graphql @@ -151,6 +151,51 @@ type BrandEdge { cursor: String! } +""" +Breadcrumb +""" +type Breadcrumb { + """ + Category id. + """ + entityId: Int! + + """ + Name of the category. + """ + name: String! +} + +""" +A connection to a list of items. +""" +type BreadcrumbConnection { + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + A list of edges. + """ + edges: [BreadcrumbEdge] +} + +""" +An edge in a connection. +""" +type BreadcrumbEdge { + """ + The item at the end of the edge. + """ + node: Breadcrumb! + + """ + A cursor for use in pagination. + """ + cursor: String! +} + """ Bulk pricing tier that sets a fixed price for the product or variant. """ @@ -299,6 +344,17 @@ type Category implements Node { Category description. """ description: String! + + """ + Category breadcrumbs. + """ + breadcrumbs( + depth: Int! + before: String + after: String + first: Int + last: Int + ): BreadcrumbConnection! products( before: String after: String @@ -667,6 +723,11 @@ type Image { """ url(width: Int!, height: Int): String! + """ + Absolute path to original image using store CDN. + """ + urlOriginal: String! + """ Text description of an image that can be used for SEO and/or accessibility purposes. """