App reviews, troubleshooting, and recommendations
Hi, im on the process on create an app extension with cart-transform functions. im facing the following problem when trying to update attributes when merging products.
First i create a shopify app with npm init @Shopify/app@latest (Current Shopify CLI version: 3.60.1)
After setting that up a shopify.app.toml file is created that has api_version='2024-04'
Then upon creating and extension with shopify app generate extension, an extension is created, but within this one, the shopify.extension.toml file says it uses api_version="2024-01' which is breaking my app because i require to use new properties that where introduced in 2024-04.
Im trying to use the attribute property of the mergeOperation. This exists in 2024-04 but not on 2024-01. Upon manually changing the api_version in shopify.extension.toml, i expect the file inside generated/api.ts to have the updated mergeOperation attributes allowing for me to use attributes field, but this is not happening.
How can i assure that my extension is in fact at the time of building and deploying using version 2024-04?
Thanks!
I'm having a similar problem with a different function - particularly the product discount function.
The `CartLineTarget` isn't available until `2024-07`, but the default `shopify app generate extension` produces an extension with a `shopify.extension.toml` of `2024-04`.
I attempted to update the `api_version` in the `shopify.extension.toml` to `2024-07` manually, then regenerated the GraphQL types, but no luck. Still stuck.
Then I tried rebuilding the extension, but again no update.
Want to see it in action? Check out our demo store.
I found the solution, you need to update the schema after updating the `api_version` field.
Here's the documentation on how to do that:
https://shopify.dev/docs/apps/build/functions/input-output#api-versions
1. Update the `api_version` in your `shopify.extension.toml` file
2. Run `shopify app function schema`
3. Run `shopify app function typegen`
Then your extensions API version will be updated.
Want to see it in action? Check out our demo store.
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025