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
If you accidentally specify a directory instead of a filepath as a key in generates, the graphql-codegen command will exit with an error code of 1, but provide no other messaging as to what's gone wrong.
In the StackBlitz example terminal, run: npm run codegen && echo done
Notice that "done" is not printed; this is because the codegen step exits with code 1.
If you change output to "output/types.ts" in the codegen.ts file and run the same command, you'll see that the operation completes and prints out "done".
Expected behavior
As a user, I expected some sort of error message to indicate what I've done wrong here, but instead an exit code (and a lack of generated output) is my only indication that anything's gone wrong at all.
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
If you accidentally specify a directory instead of a filepath as a key in
generates
, thegraphql-codegen
command will exit with an error code of 1, but provide no other messaging as to what's gone wrong.Your Example Website or App
https://stackblitz.com/edit/github-itj2kj?file=package.json
Steps to Reproduce the Bug or Issue
In the StackBlitz example terminal, run:
npm run codegen && echo done
Notice that "done" is not printed; this is because the
codegen
step exits with code 1.If you change
output
to"output/types.ts"
in thecodegen.ts
file and run the same command, you'll see that the operation completes and prints out "done".Expected behavior
As a user, I expected some sort of error message to indicate what I've done wrong here, but instead an exit code (and a lack of generated output) is my only indication that anything's gone wrong at all.
Screenshots or Videos
No response
Platform
graphql
version: v16.6.0@graphql-codegen/*
version(s):Codegen Config File
Additional context
From stepping through the CLI code, it looks like there's just no error reporting on the output step.
The text was updated successfully, but these errors were encountered: