Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

ShopifyFunction not found after installing custom app in Plus store

Solved

ShopifyFunction not found after installing custom app in Plus store

cjies
Shopify Partner
2 1 0

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.

 

Screenshot 2024-09-12 at 9.27.48 AM.png

 

We are looking forward to your support. If any account or app information is needed, I can provide in DM.

Thank you.

 

 

Best,

CJ

 

Accepted Solution (1)

cjies
Shopify Partner
2 1 0

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.

View solution in original post

Reply 1 (1)

cjies
Shopify Partner
2 1 0

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.