|
1 | 1 | # Breaking change notice for version 15.0.0 |
2 | 2 |
|
| 3 | +## Removal of positional `storefront_access_token` parameter from Storefront GraphQL Client |
| 4 | + |
| 5 | +The `ShopifyAPI::Clients::Graphql::Storefront` class no longer accepts the public Storefront access token as a positional parameter. You must now use the named parameters `private_token:` or `public_token:` instead. |
| 6 | + |
| 7 | +This parameter was deprecated in [PR #1302](https://github.com/Shopify/shopify-api-ruby/pull/1302) (v14.1.0). |
| 8 | + |
| 9 | +### Previous implementation (deprecated in v14.1.0) |
| 10 | + |
| 11 | +```ruby |
| 12 | +# Old way: passing token as positional parameter |
| 13 | +client = ShopifyAPI::Clients::Graphql::Storefront.new(shop_url, storefront_access_token) |
| 14 | + |
| 15 | +# With API version |
| 16 | +client = ShopifyAPI::Clients::Graphql::Storefront.new(shop_url, storefront_access_token, api_version: "2024-01") |
| 17 | +``` |
| 18 | + |
| 19 | +### New implementation (required in v15.0.0) |
| 20 | + |
| 21 | +```ruby |
| 22 | +# Use private token (recommended) |
| 23 | +client = ShopifyAPI::Clients::Graphql::Storefront.new(shop_url, private_token: storefront_private_access_token) |
| 24 | + |
| 25 | +# Or use public token |
| 26 | +client = ShopifyAPI::Clients::Graphql::Storefront.new(shop_url, public_token: storefront_public_access_token) |
| 27 | + |
| 28 | +# With API version |
| 29 | +client = ShopifyAPI::Clients::Graphql::Storefront.new( |
| 30 | + shop_url, |
| 31 | + private_token: storefront_private_access_token, |
| 32 | + api_version: "2024-01" |
| 33 | +) |
| 34 | +``` |
| 35 | + |
| 36 | +For more information on private vs public Storefront access tokens, see [Shopify's authentication documentation](https://shopify.dev/docs/api/usage/authentication#getting-started-with-private-access). |
3 | 37 | ## Removal of `LATEST_SUPPORTED_ADMIN_VERSION` and `RELEASE_CANDIDATE_ADMIN_VERSION` constants |
4 | 38 |
|
5 | 39 | The `LATEST_SUPPORTED_ADMIN_VERSION` and `RELEASE_CANDIDATE_ADMIN_VERSION` constants have been removed to prevent semantic versioning (semver) breaking changes. Previously, these constants would automatically update every quarter when new API versions were released, causing unintended breaking changes for apps. |
@@ -68,7 +102,8 @@ Make a module or class that includes or extends `ShopifyAPI::Webhooks::WebhookHa |
68 | 102 |
|
69 | 103 | In v14, adding new fields to the callback would become a breaking change. To make this code more flexible, handlers will now receive an object that can be typed and extended. |
70 | 104 |
|
71 | | -`data` will have the following keys |
| 105 | +`data` will have the following keys: |
| 106 | + |
72 | 107 | - `topic`, `String` - The topic of the webhook |
73 | 108 | - `shop`, `String` - The shop domain of the webhook |
74 | 109 | - `body`, `T::Hash[String, T.untyped]`- The body of the webhook |
|
0 commit comments