0

stack using ractjs (typescript) Graphql Problem facing I am trying to generate graphql.ts file using codegen, but when I generate I get duplicate exports. here is my codegen config file.

also i (GraphQL Codegen duplicates RegisterDocument with typescript-urql),(https://github.com/dotansimha/graphql-code-generator/issues/8123) tried the same way but didn't help

codegen setup:

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

const config: CodegenConfig = {
    overwrite: true,
    schema: 'http://localhost:1337/graphql',
    documents: './src/**/*.graphql',
    generates: {
        './src/gql/': {
            preset: 'client',
            plugins: [
                'typescript',
                'typescript-operations',
                {
                    'typescript-react-apollo': {
                        // Set the `hooks` option to `true` to generate hooks for queries
                        hooks: true
                    }
                }
            ]
        }
    }
}

export default config

i need fix this error Multiple exports with the same

ananthu
  • 11
  • 2
  • the comment here https://stackoverflow.com/a/74137167/6429674 specifies that `The preset: "client" is not meant to be used in combination with other plugins. ` (which you are doing) – Berci May 01 '23 at 06:48

0 Answers0