Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): --verbose and --debug flags #8147

Merged
merged 8 commits into from
Jul 27, 2022
Merged

Conversation

charlypoly
Copy link
Contributor

Closes #4946

@charlypoly charlypoly self-assigned this Jul 27, 2022
@vercel
Copy link

vercel bot commented Jul 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
graphql-code-generator ✅ Ready (Inspect) Visit Preview Jul 27, 2022 at 0:04AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2022

🦋 Changeset detected

Latest commit: 3c86cba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@graphql-codegen/cli Patch
@graphql-codegen/plugin-helpers Patch
@graphql-cli/codegen Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@theguild-bot
Copy link
Collaborator

theguild-bot commented Jul 27, 2022

The latest changes of this PR are available as alpha in npm (based on the declared changesets):

@graphql-cli/codegen@2.3.5-alpha-7e47fba48.0
@graphql-codegen/cli@2.10.1-alpha-7e47fba48.0
@graphql-codegen/core@2.6.1-alpha-7e47fba48.0
@graphql-codegen/c-sharp@4.3.1-alpha-7e47fba48.0
@graphql-codegen/c-sharp-common@0.1.1-alpha-7e47fba48.0
@graphql-codegen/c-sharp-operations@2.3.1-alpha-7e47fba48.0
@graphql-codegen/flow@2.3.3-alpha-7e47fba48.0
@graphql-codegen/flow-operations@2.3.3-alpha-7e47fba48.0
@graphql-codegen/flow-resolvers@2.3.3-alpha-7e47fba48.0
@graphql-codegen/java-apollo-android@2.3.3-alpha-7e47fba48.0
@graphql-codegen/java-common@2.2.3-alpha-7e47fba48.0
@graphql-codegen/java@3.3.3-alpha-7e47fba48.0
@graphql-codegen/kotlin@2.3.3-alpha-7e47fba48.0
@graphql-codegen/java-resolvers@2.3.3-alpha-7e47fba48.0
@graphql-codegen/add@3.2.1-alpha-7e47fba48.0
@graphql-codegen/fragment-matcher@3.3.1-alpha-7e47fba48.0
@graphql-codegen/hasura-allow-list@1.1.1-alpha-7e47fba48.0
@graphql-codegen/introspection@2.2.1-alpha-7e47fba48.0
@graphql-codegen/jsdoc@2.3.3-alpha-7e47fba48.0
@graphql-codegen/schema-ast@2.5.1-alpha-7e47fba48.0
@graphql-codegen/time@3.2.1-alpha-7e47fba48.0
@graphql-codegen/urql-introspection@2.2.1-alpha-7e47fba48.0
@graphql-codegen/visitor-plugin-common@2.12.1-alpha-7e47fba48.0
@graphql-codegen/typescript-apollo-angular@3.5.3-alpha-7e47fba48.0
@graphql-codegen/typescript-apollo-client-helpers@2.2.3-alpha-7e47fba48.0
@graphql-codegen/typescript-document-nodes@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-enum-array@2.2.1-alpha-7e47fba48.0
@graphql-codegen/typescript-generic-sdk@2.4.3-alpha-7e47fba48.0
@graphql-codegen/gql-tag-operations@1.4.1-alpha-7e47fba48.0
@graphql-codegen/typescript-graphql-apollo@1.2.1-alpha-7e47fba48.0
@graphql-codegen/typescript-graphql-files-modules@2.2.1-alpha-7e47fba48.0
@graphql-codegen/typescript-graphql-request@4.5.3-alpha-7e47fba48.0
@graphql-codegen/typescript-jit-sdk@2.1.3-alpha-7e47fba48.0
@graphql-codegen/typescript-mongodb@2.4.3-alpha-7e47fba48.0
@graphql-codegen/typescript-msw@1.1.3-alpha-7e47fba48.0
@graphql-codegen/named-operations-object@2.3.1-alpha-7e47fba48.0
@graphql-codegen/typescript-oclif@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-operations@2.5.3-alpha-7e47fba48.0
@graphql-codegen/typescript-react-apollo@3.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-react-offix@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-react-query@4.0.1-alpha-7e47fba48.0
@graphql-codegen/typescript-resolvers@2.7.3-alpha-7e47fba48.0
@graphql-codegen/typescript-rtk-query@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-stencil-apollo@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-type-graphql@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typed-document-node@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript@2.7.3-alpha-7e47fba48.0
@graphql-codegen/typescript-urql@3.6.3-alpha-7e47fba48.0
@graphql-codegen/typescript-urql-graphcache@2.3.3-alpha-7e47fba48.0
@graphql-codegen/urql-svelte-operations-store@1.2.3-alpha-7e47fba48.0
@graphql-codegen/typescript-vue-apollo@3.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-vue-apollo-smart-ops@2.3.3-alpha-7e47fba48.0
@graphql-codegen/typescript-vue-urql@2.3.3-alpha-7e47fba48.0
@graphql-codegen/gql-tag-operations-preset@1.5.3-alpha-7e47fba48.0
@graphql-codegen/graphql-modules-preset@2.4.3-alpha-7e47fba48.0
@graphql-codegen/import-types-preset@2.2.3-alpha-7e47fba48.0
@graphql-codegen/near-operation-file-preset@2.4.1-alpha-7e47fba48.0
@graphql-codegen/plugin-helpers@2.6.1-alpha-7e47fba48.0

@charlypoly
Copy link
Contributor Author

@saihaj I tested the following:

Charlys-MacBook-Pro~/dev/the-guild/codegen-repros/react-query-v4(master|✚3…) % yarn run codegen --verbose
yarn run v1.22.19
$ graphql-codegen --config ./codegen.yml --verbose
[STARTED] Parse Configuration
[SUCCESS] Parse Configuration
[STARTED] Generate outputs
[STARTED] Generate src/types.ts
[STARTED] Load GraphQL schemas
[SUCCESS] Load GraphQL schemas
[STARTED] Load GraphQL documents
[SUCCESS] Load GraphQL documents
[STARTED] Generate
[SUCCESS] Generate
[SUCCESS] Generate src/types.ts
[SUCCESS] Generate outputs
✨  Done in 0.92s.
Charlys-MacBook-Pro~/dev/the-guild/codegen-repros/react-query-v4(master|✚3…) % yarn run codegen --verbose --debug
yarn run v1.22.19
$ graphql-codegen --config ./codegen.yml --verbose --debug
[STARTED] Parse Configuration
[SUCCESS] Parse Configuration
[STARTED] Generate outputs
[STARTED] Generate src/types.ts
[STARTED] Load GraphQL schemas
[SUCCESS] Load GraphQL schemas
[STARTED] Load GraphQL documents
[SUCCESS] Load GraphQL documents
[STARTED] Generate
[SUCCESS] Generate
[SUCCESS] Generate src/types.ts
[SUCCESS] Generate outputs
Running lifecycle hook "afterStart" scripts...
Running lifecycle hook "afterStart" script: node test.js with args: ...
HEY!

[CLI] Loading Schemas
[CLI] Loading Documents
[CLI] Generating output
✨  Done in 0.95s.
Charlys-MacBook-Pro~/dev/the-guild/codegen-repros/react-query-v4(master|✚3…) % yarn run codegen --debug          
yarn run v1.22.19
$ graphql-codegen --config ./codegen.yml --debug
✔ Parse Configuration
✔ Generate outputs
Running lifecycle hook "afterStart" scripts...
Running lifecycle hook "afterStart" script: node test.js with args: ...
HEY!

[CLI] Loading Schemas
[CLI] Loading Documents
[CLI] Generating output
✨  Done in 1.12s.

The "HEY!" line comes from a custom hook node script that console.log to test the forwarding of logs with debug mode on.

@charlypoly charlypoly marked this pull request as ready for review July 27, 2022 11:14
@charlypoly charlypoly requested a review from saihaj July 27, 2022 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] add --verbose and --debug flags to cli
3 participants