-
Notifications
You must be signed in to change notification settings - Fork 1
/
codegen.yml
22 lines (21 loc) · 913 Bytes
/
codegen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This file is used by graphql-codegen to create our schema types from a specified URL
# Query services are also generated from the files located in src/app/graphql/queries/*.graphql
# A new file can be generated at any time by running: npm run generate
overwrite: true
schema: ${SCHEMA_PATH:'http://localhost:4000'} # URL to fetch the schema from
documents: src/app/graphql/**/*.graphql # Our predefined queries, used to generate services
documentMode: documentNode
config:
preResolveTypes: true
avoidOptionals: true
generates:
./src/app/graphql/schema.ts: # Output file: Where we store our schema types
plugins:
- typescript
- typescript-operations
- typescript-apollo-angular
./src/app/graphql/possible-types.ts: # Used by Apollo Cache in AppModule
plugins:
- fragment-matcher
config:
apolloClientVersion: 2