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
I've a backend that works 99% with the admin API, but, because there's nowhere to do a cartCreate with it, that has to be from the storefront. I'm using @shopify/shopify-api v11.6.1 and everything runs perfectly, at run-time, and everything with the admin side of things works absolutely perfectly at compile time and run-time.
With the storefront side of things, in vscode, there's no automatic association between the generated code and the actual response, even though the code is generated perfectly.
A similar call with the admin api, without anything changing in the project settings,
If I go and manually reference the generated file, we get what we want,
Storefront gen command npx graphql-codegen -p storefront
I've followed the advice in #1058 to get 90% of the way there, but not all the way.
At the end of the day, especially because this is the only storefront call I make with our backend, and I can manually reference that output, or just type it out myself, it's not really a big issue, but it does seem like a bug, and should work "out of the box" like with admin.
Before opening this issue, I have:
[ x ] Upgraded to the latest version of the relevant packages
No idea the actual reason, but I know now what causes this. Using pnpm. I set up a vanilla project to see if I could figure some things out, and couldn't get anything working at all. Found a stack overflow that said the age old rm -rf node_modules && npm i, which I did, instead of my usual pnpm, and everything worked exactly right.
I then did the same again, but pnpm i and? Same problem, no "connection" to the storefront and the typehinting for the storefront side was lost.
Issue summary
Issue is as stated, snapshots:
I've a backend that works 99% with the admin API, but, because there's nowhere to do a
cartCreate
with it, that has to be from the storefront. I'm using@shopify/shopify-api
v11.6.1 and everything runs perfectly, at run-time, and everything with the admin side of things works absolutely perfectly at compile time and run-time.With the storefront side of things, in vscode, there's no automatic association between the generated code and the actual response, even though the code is generated perfectly.
A similar call with the admin api, without anything changing in the project settings,
If I go and manually reference the generated file, we get what we want,
.graphqlrc.ts
Admin gen command
npx graphql-codegen
Storefront gen command
npx graphql-codegen -p storefront
I've followed the advice in #1058 to get 90% of the way there, but not all the way.
At the end of the day, especially because this is the only storefront call I make with our backend, and I can manually reference that output, or just type it out myself, it's not really a big issue, but it does seem like a bug, and should work "out of the box" like with admin.
Before opening this issue, I have:
@shopify/*
package and version:{ logger: { level: LogSeverity.Debug } }
in my configuration, when applicableThe text was updated successfully, but these errors were encountered: