Skip to content
Discussion options

You must be logged in to vote

Hey, @PhilipAngelinNE You should remove the 'typescript' plugin from the plugins array. The client preset already automatically applies this plugin.

import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
  schema: 'http://localhost:11500/graphql',
  documents: 'api/queries/**/*.graphql',
  ignoreNoDocuments: true,
  generates: {
    'api/gql/': {
      preset: 'client',
-     plugins: ['typescript'],
+     plugins: [],
      config: {
        maybeValue: 'T | null | undefined',
      },
    },
  },
};

export default config;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@PhilipAngelinNE
Comment options

@n1ru4l
Comment options

n1ru4l Feb 16, 2023
Collaborator

Answer selected by n1ru4l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants