rsnext/examples/with-typescript-graphql/package.json
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

40 lines
1.2 KiB
JSON

{
"private": true,
"scripts": {
"codegen": "graphql-codegen -r ts-node/register",
"dev": "yarn codegen && next",
"build": "yarn codegen && next build",
"test": "yarn codegen && jest",
"start": "next start"
},
"dependencies": {
"@apollo/client": "^3.5.10",
"graphql-tag": "^2.12.6",
"@graphql-tools/load-files": "6.0.18",
"@graphql-yoga/node": "^2.2.1",
"@graphql-tools/merge": "6.0.18",
"@graphql-tools/schema": "6.0.18",
"graphql": "15.6.0",
"next": "^12.1.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@graphql-codegen/typed-document-node": "^2.2.8",
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/typescript": "^2.4.8",
"@graphql-codegen/typescript-operations": "^2.3.5",
"@graphql-codegen/typescript-resolvers": "^2.6.1",
"@types/jest": "^27.0.2",
"@types/mocha": "^9.0.0",
"@types/react": "^16.9.46",
"@types/react-dom": "^16.9.8",
"@types/react-test-renderer": "^17.0.1",
"babel-jest": "27.2.5",
"jest": "^27.2.5",
"react-test-renderer": "^17.0.1",
"typescript": "^4.6.3",
"yaml-loader": "0.6.0",
"ts-node": "10.8.0"
}
}