17 lines
441 B
JavaScript
17 lines
441 B
JavaScript
/** @type {import('@graphql-codegen/cli').CodegenConfig} */
|
|
module.exports = {
|
|
documents: './graphql/!(schema).graphql',
|
|
generates: {
|
|
'./graphql/types.ts': {
|
|
config: {
|
|
avoidOptionals: true,
|
|
onlyOperationTypes: true,
|
|
useTypeImports: true,
|
|
},
|
|
plugins: ['typescript', 'typescript-operations', 'typed-document-node'],
|
|
},
|
|
},
|
|
overwrite: true,
|
|
schema: 'http://localhost:1337/graphql',
|
|
};
|