Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!(gatsby-source-shopify): upgrade from Shopify API version 2024-04 to 2025-01 #39247

Merged
merged 11 commits into from
Mar 27, 2025

Conversation

mrstork
Copy link
Contributor

@mrstork mrstork commented Mar 18, 2025

Description

This upgrades the default Shopify API version in gatsby-source-shopify from 2024-04 to 2025-01.

Due to fields being moved/removed in the Shopify API, this upgrade includes breaking changes.

  • ProductVariant.requiresShipping has been removed but is still available at InventoryItem.requiresShipping
  • InventoryItem.productBased and InventoryItem.shippingMethods have been removed
  • Locations.fulfillmentService.shippingMethods has been removed
  • ShopifyProductVariant.weight and ShopifyProductVariant.weightUnit now require locations to be set in your shopifyConnections via the plugin options.

We have also deprecated a number of fields. Please update your system to use the recommended alternative to avoid breaking changes in future version changes.

  • ShopifyProductVariant.weight and ShopifyProductVariant.weightUnit should be migrated to use InventoryItem.measurement.weight
  • ShopifyFulfillmentService.fulfillmentOrdersOptIn is deprecated upstream in the ShopifyApi
  • All of the following fields should be migrated to use ShopifyInventoryLevel.quantities instead:
    • ShopifyInventoryLevel.available
    • ShopifyInventoryLevel.incoming
    • ShopifyInventoryLevel.committed
    • ShopifyInventoryLevel.reserved
    • ShopifyInventoryLevel.damaged
    • ShopifyInventoryLevel.safety_stock
    • ShopifyInventoryLevel.quality_control

We didn't surface all new additional fields that have been added by Shopify in these versions. If you have fields you would like to see added, please open an issue or PR.

Documentation

Related Issues

Fixed FRB-1687

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 18, 2025
@mrstork mrstork requested review from pieh and serhalp March 18, 2025 18:49
@@ -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

@@ -112,7 +117,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

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

@mrstork mrstork force-pushed the update-shopify-schema branch from e78af39 to 31dfa61 Compare March 18, 2025 19:06
@mrstork mrstork force-pushed the update-shopify-schema branch from c6e95b8 to 295f40a Compare March 19, 2025 15:47
@mrstork mrstork changed the title Update shopify schema feat!(gatsby-source-shopify): upgrade from Shopify API version 2024-04 to 2025-01 Mar 19, 2025
@mrstork mrstork marked this pull request as ready for review March 21, 2025 18:04
@pieh pieh added topic: source-shopify Related to the gatsby-source-shopify plugin and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 27, 2025
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Tested on my side and things seem great! Let's get this in and have at least @next released asap

@pieh pieh merged commit 132013c into master Mar 27, 2025
39 checks passed
@pieh pieh deleted the update-shopify-schema branch March 27, 2025 17:20
pieh pushed a commit that referenced this pull request Mar 27, 2025
…4 to 2025-01 (#39247)

* chore: sort the queried fields

* feat: address breaking api changes when upgrading to 2024-07

* feat!: address breaking changes when upgrading to 2024-10

* fix: address breaking changes when upgrading to 2025-01

* fix: add deprecation message for fulfillmentOrdersOptIn

* fix: make measurement a required field to match shopify api response

* fix: object definition already in common

* fix: add backwards compatibility for weight/weightUnit fields

* fix: add deprecation messages for proxied quantities fields

* test: update snapshots

(cherry picked from commit 132013c)
pieh added a commit that referenced this pull request Mar 28, 2025
…4 to 2025-01 (#39247) (#39252)

* feat!(gatsby-source-shopify): upgrade from Shopify API version 2024-04 to 2025-01 (#39247)

* chore: sort the queried fields

* feat: address breaking api changes when upgrading to 2024-07

* feat!: address breaking changes when upgrading to 2024-10

* fix: address breaking changes when upgrading to 2025-01

* fix: add deprecation message for fulfillmentOrdersOptIn

* fix: make measurement a required field to match shopify api response

* fix: object definition already in common

* fix: add backwards compatibility for weight/weightUnit fields

* fix: add deprecation messages for proxied quantities fields

* test: update snapshots

(cherry picked from commit 132013c)

* chore: bump caniuse-lite

* ci: pin pnpm used in pnpm integration tests to v9 (#39248)

v10 has a lot of breaking changes:
https://github.com/pnpm/pnpm/releases/tag/v10.0.0.

* test: use branch/alias deploys for e2e test suite (#39222)

* test: use branch/alias deploys for e2e test suite

* test: use permalink url and not alias url

---------

Co-authored-by: Michal Piechowiak <[email protected]>

---------

Co-authored-by: Mateusz Bocian <[email protected]>
Co-authored-by: Michal Piechowiak <[email protected]>
Co-authored-by: Philippe Serhal <[email protected]>
@pieh
Copy link
Contributor

pieh commented Mar 28, 2025

This was released:

Successfully published:
 - [email protected]
lerna success published 1 package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-shopify Related to the gatsby-source-shopify plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants