GraphQL
Check Project 1. Here is simple example without any DB
Installing Apollo Server and Graphql
$ npm install apollo-server-express graphql
$ npm install @types/graphql
Install Apollo Client
$ npm install apollo-boost react-apollo graphql
$ npm install @types/graphql
package.json
{
"scripts" : {
"codegen:schema": "npx apollo client:download-schema --endpoint=http://localhost/api",
"codegen:generate": "npx apollo client:codegen --localSchemaFile=schema.json --includes=src/**/*.tsx --target=typescript",
}
}
[OpenJS Foundation] Type-safe GraphQL with TypeScript - Aaron Powell, Microsoft
https://github.com/aaronpowell/graphql-typescript-workshop