-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
23 lines (21 loc) · 956 Bytes
/
Copy pathcodegen.ts
File metadata and controls
23 lines (21 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'schema.graphql',
documents: ['src/app/**/*.graphql'],
generates: {
'src/app/graphql/generated.ts': {
// Base schema types (inputs, enums, object types) for type-safe use in
// components that write inline `gql` documents.
//
// NOTE: The full typed-operations + Apollo service-class generation
// (typescript-operations + typescript-apollo-angular) is intentionally
// deferred: apollo-angular's codegen plugin (v5) is version-skewed against
// codegen core v7 / typescript plugin v6 and duplicates enum/input type
// declarations in a single-file output, which breaks the build. Revisit
// when the apollo-angular codegen plugin catches up, or split base/operation
// types into separate files with cross-imports.
plugins: ['typescript'],
},
},
};
export default config;