mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
28 lines
No EOL
799 B
TypeScript
28 lines
No EOL
799 B
TypeScript
import { type CodegenConfig } from '@graphql-codegen/cli'
|
|
import { defineConfig } from '@eddeee888/gcg-typescript-resolver-files'
|
|
|
|
const config: CodegenConfig = {
|
|
schema: 'src/graphql/typeDefs/**/*.graphql',
|
|
documents: ['src/**/*.{astro,ts,tsx,mts}'],
|
|
generates: {
|
|
'./src/graphql/__generated__/client/': {
|
|
preset: 'client',
|
|
plugins: [],
|
|
presetConfig: { gqlTagName: 'gql' },
|
|
config: { useTypeImports: true }
|
|
},
|
|
'./src/graphql/__generated__/': defineConfig({
|
|
resolverGeneration: 'disabled',
|
|
typesPluginsConfig: {
|
|
contextType: '../client.mts#ResolverContext',
|
|
maybeValue: 'T'
|
|
},
|
|
add: {
|
|
'./types.generated.ts': { content: '// @ts-nocheck' },
|
|
},
|
|
})
|
|
},
|
|
ignoreNoDocuments: true
|
|
}
|
|
|
|
export default config |