I use @graphql/codegen-cli to autogenerate my graphql typings using the below config...
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
schema: 'schema.graphql',
documents: 'src/**/*.graphql',
generates: {
'src/pages/api/graphql/generated/': {
preset: 'client',
plugins: [],
config: {},
},
'./graphql.schema.json': {
plugins: ['introspection'],
},
}
};
export default config;
Amongst the generated files, the 'index.ts' file looks like so...
export * from './fragment-masking';
export * from './gql';
This causes a re-export error with next.js in production. I need help to fix this automatically, perhaps during the generation process.