[英]How do I see GraphQL Code Generator cli's output?
I am using this https://github.com/dotansimha/graphql-code-generator for GraphQL code generation.我正在使用这个https://github.com/dotansimha/graphql-code-generator来生成 GraphQL 代码。 The cli output is as below. cli 输出如下。 Something is wrong with the "Generate outputs" because I am getting duplicate entities when generating the code, but since it is in cli, i am not able to expand the part. “生成输出”有问题,因为我在生成代码时得到了重复的实体,但由于它在 cli 中,我无法扩展该部分。 How do I expand and see what is happening there.我如何扩展并查看那里发生了什么。
$ yarn gen
yarn run v1.22.17
$ graphql-codegen --config codegen.ts
✔ Parse Configuration
❯ Generate outputs
✔ Parse Configuration
✔ Generate outputs
Done in 3.71s.
After configuring the details in codegen.yml/ts one of the fields is responsible where to generate the output.在 codegen.yml/ts 中配置详细信息后,其中一个字段负责生成输出的位置。
please see the ./dist/output/:
line.请查看./dist/output/:
行。 this is where the generated code will be based on this config.这是生成的代码将基于此配置的位置。 It can also be a single file.它也可以是单个文件。
reference: https://the-guild.dev/graphql/codegen/docs/config-reference/codegen-config参考: https ://the-guild.dev/graphql/codegen/docs/config-reference/codegen-config
example:例子:
schema: '**/*.graphql'
documents:
- './src/**/*.graphql'
generates:
./dist/output/:
preset: client-preset
plugins:
- typescript
- typescript-resolvers
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.