rsnext/examples/with-typescript-graphql/codegen.yml
Charly POLY 565a2fafac
refactor(examples/with-typescript-graphql): use codegen TypedDocumentNode and GraphQL Yoga for better DX and smaller bundle size (#36240)
Improve the Next.js with TypeScript + GraphQL example:

- [x] use GraphQL Code Generator instead of `graphql-let`: more widespread tool and smaller bundle size (types only generation vs code generation)
- [x] use GraphQL Yoga instead of Apollo Server Micro: for lighter bundle size as [stated here](https://github.com/vercel/next.js/pull/36155)
- [x] introduces GraphQL Code Generator on the API side for Resolvers typing

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-23 16:58:27 +00:00

14 lines
309 B
YAML

schema:
- 'lib/schema.ts':
noRequire: true
documents: ./lib/documents/*.graphql
generates:
./lib/graphql-operations.ts:
plugins:
- typescript
- typescript-operations
- typed-document-node
./lib/resolvers-types.ts:
plugins:
- typescript
- typescript-resolvers