Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function pluginOptionsSchema({ Joi }: PluginOptionsSchemaArgs): unknown {
`Not set by default. If set to a string (example \`MyStore\`) node names will be \`allMyStoreShopifyProducts\` instead of \`allShopifyProducts\``
),
apiVersion: Joi.string()
.default(`2024-04`)
.default(`2025-01`)
.description(
`The API version that should be used. More information: https://shopify.dev/docs/api/usage/versioning`
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ export class LocationsQuery extends BulkQuery {
handle
id
inventoryManagement
productBased
serviceName
shippingMethods {
code
label
}
type
}
fulfillsOnlineOrders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ export class ProductVariantsQuery extends BulkQuery {
count
precision
}
measurement {
weight {
unit
value
}
}
provinceCodeOfOrigin
requiresShipping
sku
Expand Down Expand Up @@ -112,7 +118,6 @@ export class ProductVariantsQuery extends BulkQuery {
product {
id
}
requiresShipping
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field has been fully removed now

selectedOptions {
name
value
Expand All @@ -127,8 +132,6 @@ export class ProductVariantsQuery extends BulkQuery {
taxable
title
updatedAt
weight
weightUnit
metafields {
edges {
node {
Expand Down
21 changes: 16 additions & 5 deletions packages/gatsby-source-shopify/src/type-builders/location-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export function locationTypeBuilder(prefix: string): string {
fulfillmentOrdersOptIn: Boolean!
handle: String!
inventoryManagement: Boolean!
productBased: Boolean! @deprecated(reason: "\`productBased\` will be removed in version 2024-07, non-product based fulfillment services are no longer supported")
serviceName: String!
shippingMethods: [${prefix}ShippingMethod!]!
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated in 2024-10 then removed in the following version

shopifyId: String!
type: ${prefix}FulfillmentServiceType!
}
Expand All @@ -27,6 +25,7 @@ export function locationTypeBuilder(prefix: string): string {
inventoryLevels: [${prefix}InventoryLevel!]! @link(by: "id") @proxy(from: "inventoryLevels___NODE", fromNode: true)
legacyResourceId: String!
locationsCount: Int! @proxy(from: "locationsCount.count")
measurement: ${prefix}InventoryItemMeasurement
provinceCodeOfOrigin: String
requiresShipping: Boolean!
shopifyId: String!
Expand All @@ -38,6 +37,11 @@ export function locationTypeBuilder(prefix: string): string {
variant: ${prefix}ProductVariantConnection!
}

type ${prefix}InventoryItemMeasurement {
id: ID!
weight: ${prefix}Weight
}

type ${prefix}InventoryQuantity {
name: String!
quantity: Int!
Expand Down Expand Up @@ -92,9 +96,16 @@ export function locationTypeBuilder(prefix: string): string {
zip: String
}

type ${prefix}ShippingMethod {
code: String!
label: String!
type ${prefix}Weight {
unit: ${prefix}WeightUnit!
value: Float!
}

enum ${prefix}WeightUnit {
GRAMS
KILOGRAMS
OUNCES
POUNDS
}

extend type ${prefix}ProductVariant {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,20 @@ export function productVariantTypeBuilder(prefix: string): string {
presentmentPrices: [${prefix}ProductVariantPricePair!]!
price: Float!
product: ${prefix}Product! @link(from: "_product", by: "id")
requiresShipping: Boolean! @deprecated(reason: "Use \`InventoryItem.requiresShipping\` instead.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field has been fully removed now

selectedOptions: [${prefix}SelectedOption!]!
sellingPlanGroupCount: Int! @proxy(from: "sellingPlanGroupsCount.count")
sku: String
shopifyId: String!
sku: String
storefrontId: String!
taxCode: String
taxable: Boolean!
taxCode: String
title: String!
updatedAt: Date! @dateformat
weight: Float
weightUnit: ${prefix}WeightUnit!
}

enum ${prefix}ProductVariantInventoryPolicy {
DENY
CONTINUE
DENY
}

type ${prefix}ProductVariantPricePair {
Expand Down
Loading