Discussing Shopify Functions development, deployment, and usage in Shopify apps.
Hi team,
Currently we are developing a custom app for our Plus store, which the custom app contains a extension with Cart Transform Function. Everything works fine on development store or even a brand new store that hosted under the same Plus organization, but when we install the custom app to our production store (just upgraded to Plus plan last month), we are not able to find the related function in Admin GraphQL and create a cart transform with the function.
Here is the admin query we used to find the function id:
query { shopifyFunctions(first: 10) { nodes { id app { title } } }
appByHandle(handle: "<CUSTOM_APP>") {
title
} }
"shopifyFunctions" always returned empty list even the custom app can be found by its handle name. The same query works fine on a development store and brand new store, we can get the function id from above query and apply it to cart transform.
The same issue also happening on Checkout Blocks app. In development store and new store, we can found the checkout block's functions in "shopifyFunctions" list. But in production store, the "shopifyFunctions" list is always returning empty list.
Same query with Checkout Blocks app:
query { shopifyFunctions(first: 10) { nodes { id app { title } } } appByHandle(handle: "checkout-blocks") { title } }
We are aware the Checkout Extensibility feature must be upgraded. Every additional scripts were cleared up from the dashboard but we still not able to use the Functions API as expected.
We are looking forward to your support. If any account or app information is needed, I can provide in DM.
Thank you.
Best,
CJ
Solved! Go to the solution
This is an accepted solution.
We found the root cause and resolved the issue.
If we run below admin GraphQL query externally (via Postman or fetch API call) with the access token we generated from the store itself. "shopifyFunctions" will always return an empty list.
query { shopifyFunctions(first: 10) { nodes { id app { title } } } }
If we install GraphiQL tool from Shopify with the same access scopes, and run the same query. We are able to get the expected function output from the "shopifyFunctions" list, then bind the function id into cart transform API correctly.
Thank you.
This is an accepted solution.
We found the root cause and resolved the issue.
If we run below admin GraphQL query externally (via Postman or fetch API call) with the access token we generated from the store itself. "shopifyFunctions" will always return an empty list.
query { shopifyFunctions(first: 10) { nodes { id app { title } } } }
If we install GraphiQL tool from Shopify with the same access scopes, and run the same query. We are able to get the expected function output from the "shopifyFunctions" list, then bind the function id into cart transform API correctly.
Thank you.