-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodegen.ts
More file actions
27 lines (25 loc) · 817 Bytes
/
codegen.ts
File metadata and controls
27 lines (25 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import 'dotenv/config'
import { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
schema: `${process.env.STORYBOOK_PLATFORM_GRAPHQL}v01/server/graphql` ?? 'https://roq-core-snapshot-gateway.roq-platform.com/v01/server/graphql',
documents: ['./src/lib/graphql/**.ts', './src/lib/graphql/**/**.ts'],
generates: {
'./src/lib/graphql/types/': {
preset: 'client',
plugins: [],
},
'./src/lib/graphql/hooks/generated.tsx': {
plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'],
config: {
withMutationFn: false,
withHOC: false,
withHooks: true,
withComponent: false,
namingConvention: 'keep',
noNamespaces: true,
noGraphQLTag: true
}
}
},
}
export default config