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
The team was wondering if we could learn a bit more about your use case for using the Admin API in a Hydrogen project, as while there are some valid use cases for this this is not something commonly done. And the Hydrogen team is always interested in better understanding these use cases.
Are you using the @shopify/admin-api-client package for your interactions with the Admin API? If not what are you using?
Debugging might be easier if you are able to provide a simplified repository that can reproduce this error.
We are closing this issue because we did not hear back regarding additional details we needed to resolve this issue. If the issue persists and you are able to provide the missing clarification we need, feel free to respond and reopen this issue.
We appreciate your understanding as we try to manage our number of open issues.
Issue summary
Before opening this issue, I have:
@shopify/*
package and version:{ logger: { level: LogSeverity.Debug } }
in my configuration, when applicableHello everyone,
I am using the GraphQL Codegen to automatically generate TypeScript types for my Shopify queries.
I am using the
declarations: false
option.This is my
codegen.ts
file where I use your package:Expected behavior
The Shopify Hydrogen build should work as expected, even when I run
@shopify/api-codegen-preset
with the declarations: false` option.Actual behavior
Inside the admin.generated.ts this part
which is linted with the following error:
Invalid module name in augmentation, module '@shopify/admin-api-client' cannot be found.ts(2664)
which is breaking Shopify Hydrogen builds so it's difficult to start my project locally or building it in general
Steps to reproduce the problem
Attempt to use a scalar property (eg. Product['createdAt']).
Set up a typescript project using the Admin GraphQL API and codegen as per these instructions.
Startup a basic Shopify Hydrogen project by following the official guidelines
Setup the Admin GraphQL API and codegen as per the
codegen.ts
file shared aboveRun the command
npx shopify hydrogen codegen
to generate theadmin.generated.ts
fileCheck the file and see if there is the error linted there
Run the command
npm run dev
Debug logs
The text was updated successfully, but these errors were encountered: