Closed aurelienbobenrieth closed 2 weeks ago
It seems that when I only have documents: ["!node_modules"],
the codegen works fine.
However when I include documents: ["*.ts", "!node_modules"],
it fails.
I need to understand what is causing the failure. However withou any specific error thrown it's really hard to understand.
Hi, thanks for raising this. This is a curious one, we haven't had those issues, but maybe it's related to running it on Windows. We'll investigate it!
Just as a bit of extra context, have you tried skipping the helper functions and setting up the full configuration using the preset?
First thing, if I do not specify with the --config flag the path of the config file
You could add the flag to the command in the template. We can do that as well so others don't run into this.
On a side note it feels like the syntax of projects etc... written in the doc does not totally match what is expected by import type { CodegenConfig } from "@graphql-codegen/cli";.
Could you please provide some examples of the errors you're seeing here?
I've tried running the command on Windows, on Node 20/22, using the latest versions of all packages in a freshly created app, and I didn't get any errors.
I think the problems you're facing are related to graphql-codegen
, more so than our preset - especially if you still see the issue without using the helpers.
My suggestion would be to see if:
preset
from our packageIf the error isn't related to our package, I'd suggest looking for a solution in the graphql-codegen
repos, since there won't be much we can do.
Hope this helps!
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/admin-api-client": "^1.0.1"
"@shopify/api-codegen-preset": "^1.0.1"
{ logger: { level: LogSeverity.Debug } }
in my configuration, when applicableI've been trying to set up codegen following what is describe here:
First thing, if I do not specify with the
--config
flag the path of the config file, nothing is found. Even though my file is definitely at te root of my dir and has the proper name.Then when specifying the config file path I can see that the schemas and documents are loading but then it fails with an exit code 1 without any error logs even though I sepcified the
--debug --verbose
flags.On a side note it feels like the syntax of projects etc... written in the doc does not totally match what is expected by
import type { CodegenConfig } from "@graphql-codegen/cli";
.Expected behavior
Well it should generate my types.
Actual behavior
It fails ungracefully.
Steps to reproduce the problem
Follow precisely what's given here:
Debug logs