You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constshopify=shopifyApp({apiKey: process.env.SHOPIFY_API_KEY,apiSecretKey: process.env.SHOPIFY_API_SECRET||"",apiVersion: ApiVersion.October24,// <-------- Hardcoding api version here, ideally this would be a fallback/default instead,scopes: process.env.SCOPES?.split(","),appUrl: process.env.SHOPIFY_APP_URL||"",authPathPrefix: "/auth",sessionStorage: newPrismaSessionStorage(prisma),distribution: AppDistribution.AppStore,future: {unstable_newEmbeddedAuthStrategy: true,removeRest: true,},
...(process.env.SHOP_CUSTOM_DOMAIN
? {customShopDomains: [process.env.SHOP_CUSTOM_DOMAIN]}
: {}),});
What we want to acheive is to have a default for most operations in provided by the shopifyApp config and then the ability to override it in the graphql client exported from the majority of the auth contexts.
As of today, I've tried and I can't get it to work, which leads me to believe that even if the apiVersion param is exposed by the graphql function's options, it's not passed down.
The text was updated successfully, but these errors were encountered:
Overview
In here, you can see that the version of the client becomes hardcoded once the
shopifyApp
is declared once with the first version.shopify-app-js/packages/apps/shopify-app-remix/src/server/clients/admin/graphql.ts
Lines 16 to 20 in bb59d07
An example of this is the shopify remix template
shopify.server.ts
file, here:https://github.com/Shopify/shopify-app-template-remix/blob/465a566475badecfd81ccc56ceefd704e3a1a99b/app/shopify.server.ts#L10-L15
What we want to acheive is to have a default for most operations in provided by the shopifyApp config and then the ability to override it in the
graphql
client exported from the majority of the auth contexts.Like so:
As of today, I've tried and I can't get it to work, which leads me to believe that even if the
apiVersion
param is exposed by thegraphql
function's options, it's not passed down.The text was updated successfully, but these errors were encountered: