25 lines
629 B
TypeScript
25 lines
629 B
TypeScript
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
|
|
const config: CodegenConfig = {
|
|
overwrite: true,
|
|
schema: './app/server/graphql/schema.graphql',
|
|
documents: ['app/client/fragments', 'app/client/**/*.tsx'],
|
|
generates: {
|
|
'./__generated__/': {
|
|
preset: 'client',
|
|
presetConfig: {
|
|
gqlTagName: 'gql'
|
|
},
|
|
plugins: ['typescript', 'typescript-resolvers']
|
|
},
|
|
'./__generated__/types.ts': {
|
|
plugins: ['typescript', 'typescript-operations']
|
|
},
|
|
'./graphql.schema.json': {
|
|
plugins: ['introspection']
|
|
}
|
|
},
|
|
ignoreNoDocuments: true
|
|
};
|
|
|
|
export default config;
|