24 lines
630 B
JavaScript
24 lines
630 B
JavaScript
/** @type {import('@graphql-codegen/cli').CodegenConfig} */
|
|
module.exports = {
|
|
documents: ['./operations/*.graphql'],
|
|
generates: {
|
|
'./types/operations.generated.ts': {
|
|
config: {
|
|
avoidOptionals: false,
|
|
maybeValue: 'T | null | undefined',
|
|
onlyOperationTypes: true,
|
|
scalars: {
|
|
Date: 'string',
|
|
DateTime: 'string',
|
|
Long: 'number',
|
|
Time: 'string',
|
|
},
|
|
useTypeImports: true,
|
|
},
|
|
plugins: ['typescript', 'typescript-operations', 'typed-document-node'],
|
|
},
|
|
},
|
|
overwrite: true,
|
|
schema: require('./config.cjs').url,
|
|
};
|