graphql-code-generator
graphql-code-generator copied to clipboard
A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
in my company we like to suffix graphql types with `QLType` so for example `User` schema type would become `UserQLType`. typescript type, however, the codegen also suffixes enum values which...
When using the MongoDB plugin together with external tools I often run into issues because the schema is missing the directive definitions. My current solution is to keep a `schema-directives.graphql`...
### Describe the bug I love codegen and the MongoDB plugin - having full typesafety from Database to Client is just awesome. But I'm running into issues time and time...
**Is your feature request related to a problem? Please describe.** We are using the `typescript-react-apollo` plugin along with the `withHooks` option. The problem is that when the hook is called...
**Describe the bug** Getting the following build errors with TS: ``` node_modules/@graphql-codegen/plugin-helpers/oldVisit.d.ts:5:75 - error TS2339: Property 'enter' does not exist on type '{ readonly enter?: ASTVisitFn | undefined; readonly leave:...
**Describe the bug** I have installed the latest version of graphql-codegen and used the same config from another project to generate the types. It works on the old project, but...
### Describe the bug Following the example snippets [in the docs](https://www.graphql-code-generator.com/plugins/typescript-react-query#using-graphql-request) and using SSR with Next, the prefetchQuery never makes a request. Reading the docs one would need `exposeQueryKeys` and...
**Context** When using `typestrict-resolvers` plugin, and using the `mappers` property to map Prisma types The problem I'm seeing is specific to union types. Prisma's return types for findUnique is Promise...
Right now we have 3 ways of running the CLI: ``` "gql-gen": "dist/cjs/bin.js", "graphql-codegen": "dist/cjs/bin.js", "graphql-code-generator": "dist/cjs/bin.js", ``` Most commonly used one is `graphql-codegen`. We can remove the other ones...
**Context** When using typestrict-resolvers plugin, and using the mappers property to map Prisma types Let's say codegen generates the following: ```ts import { Post as PrismaPost } from '@prisma/client'; //...