-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
chore!(gatsby-source-shopify): upgrade from Shopify API version 2022-04 to 2024-04 #39082
base: master
Are you sure you want to change the base?
chore!(gatsby-source-shopify): upgrade from Shopify API version 2022-04 to 2024-04 #39082
Conversation
See breaking changes in: - https://shopify.dev/docs/api/release-notes/previous-versions/2022-07 - https://shopify.dev/docs/api/release-notes/previous-versions/2022-10 - https://shopify.dev/docs/api/release-notes/previous-versions/2023-01 - https://shopify.dev/docs/api/release-notes/previous-versions/2023-04
id: ID! | ||
image: ${prefix}Image | ||
legacyResourceId: String! | ||
metafield(namespace: String! key: String!): ${prefix}Metafield | ||
metafields: [${prefix}Metafield!]! @link(from: "metafields___NODE", by: "id") | ||
products: [${prefix}Product!]! @link(from: "products___NODE", by: "id") | ||
productsCount: Int! | ||
productsCount: Count! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note here for changes in type-builders
dir - with changes as they are they are breaking changes and would require major bump for shopify plugin (not necessarily bad thing, but just to make sure that implications are clear).
There is an option to preserve current shape for existing fields in Gatsby meaning users wouldn't need to change their existing queries like this:
productsCount: Count! | |
productsCount: Int! @proxy(from: "productsCount.count") |
and exposing other fields that were introduced in now object and not scalar would be adding new field and not changing existing one, so it would non-breaking change feat
productsCountPrecision: String! @proxy(from: "productsCount.precision")
---edit
Just noticed chore!
, so all good about implication of the change 👍
@@ -1 +1 @@ | |||
{"description":"Test Collection Description","descriptionHtml":"Test Collection Description","feedback":{"details":[],"summary":"This collection couldn’t be published to Google"},"handle":"test-collection","id":"gid:\/\/shopify\/Collection\/278407151822","image":null,"legacyResourceId":"278407151822","productsCount":2,"ruleSet":{"appliedDisjunctively":false,"rules":[{"column":"IS_PRICE_REDUCED","condition":"","relation":"IS_NOT_SET"}]},"seo":{"description":null,"title":null},"sortOrder":"BEST_SELLING","storefrontId":"Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzI3ODQwNzE1MTgyMg==","templateSuffix":"","title":"Test Collection","updatedAt":"2022-03-14T22:39:00Z"} | |||
{"description":"Test Collection Description","descriptionHtml":"Test Collection Description","feedback":{"details":[],"summary":"This collection couldn’t be published to Google"},"handle":"test-collection","id":"gid:\/\/shopify\/Collection\/278407151822","image":null,"legacyResourceId":"278407151822","productsCount":{count: 2, "precision": "EXACT"},"ruleSet":{"appliedDisjunctively":false,"rules":[{"column":"IS_PRICE_REDUCED","condition":"","relation":"IS_NOT_SET"}]},"seo":{"description":null,"title":null},"sortOrder":"BEST_SELLING","storefrontId":"Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzI3ODQwNzE1MTgyMg==","templateSuffix":"","title":"Test Collection","updatedAt":"2022-03-14T22:39:00Z"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those fixtures were modified by hand? (seeing missing "
around count
field)
I'll try to see if I can properly regenerate them to get actual data (if I can find the store that was used to generate those fixtures)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp, definitely won't have access to store because those were not generated by gatsby maintainers so editing by hand will have to do. But this should be validated their correctness by doing some comparisons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did update syntaxes (and corresponding snapshots) just to get over unit tests and see if some later tests fail. It does need some work, because I don't think with changes as-is it will work.
In particular referencing Shopify types like Count
or Handle
in gatsby schema types won't work - we will need to create those types ourselves first so we could use them in gatsby's data layer.
…opify-api-has-breaking-changes-and-thus-gatsby-source
Description
See breaking changes in:
Documentation
Tests
Related Issues