runnig pnpm run codegen 后在 graphql.ts 文件中多次导出同名

问题描述 投票:0回答:0

堆叠使用 strapi cms ractjs(打字稿) Graphql 在运行 codegen 命令生成 graphql 查询后面临的问题 我收到错误的多个同名导出

代码生成设置:

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

我需要修复这个错误 Multiple exports with the same

reactjs typescript graphql strapi codegen
© www.soinside.com 2019 - 2024. All rights reserved.