简体   繁体   中英

graphql codegen typescript - how to generate types only

I'm using the typescript plugin for graphql code generator

According to the doc

This is the most basic TypeScript plugin and it can generate typings based on GraphQLSchema, which can be used by any other typescript related plugin.

It generates types for your entire schema: types, input types, enums, interfaces, scalars and unions.

Is it possible to generate only types? I couldn't find anything in the docs.

You could say that all of the items mentioned (types, input types, enums, interfaces, scalars and unions) are types. If you need to generate only one of these items, unfortunately the typescript plugin currently does not support this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM