Closed banool closed 11 months ago
Using graphql-codgen in Typescript I'm able to generate code from a schema without providing any queries or mutations.
For example:
import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { overwrite: true, schema: "src/canvas/generated/schema.graphql", generates: { "src/canvas/generated/types.ts": { config: { emitLegacyCommonJSImports: false, namingConvention: "keep", avoidOptionals: true, }, plugins: ["typescript"], }, }, }; export default config;
This generates a file called types.rs that has just types, no queries or operations or mutations or anything.
Is there a way to do this with this library? It seems like there isn't via the CLI but I wonder if this is possible with the underlying libraries.
Thanks!
I realise this is a duplicate of https://github.com/graphql-rust/graphql-client/issues/443, closing.
Using graphql-codgen in Typescript I'm able to generate code from a schema without providing any queries or mutations.
For example:
This generates a file called types.rs that has just types, no queries or operations or mutations or anything.
Is there a way to do this with this library? It seems like there isn't via the CLI but I wonder if this is possible with the underlying libraries.
Thanks!