/react-graphql-playground

Primary LanguageTypeScriptMIT LicenseMIT

react-graphql-playground

Setting up environment

npm install react react-dom react-router-dom

npm install --save-dev @babel/core @babel/preset-react
touch babel.config.json

npm install --save-dev webpack webpack-cli webpack-dev-server
touch webpack.config.js

npm install --save-dev typescript
npx tsc --init

npm install --save-dev style-loader css-loader sass-loader ts-loader
npm install --save-dev eslint prettier eslint-config-prettier eslint-plugin-prettier
touch .prettierrc
npx eslint --init

npm install --save-dev husky lint-staged concurrently

Install GraphQL

npm install @apollo/client graphql

npm install --save-dev ts-node ts-node-dev
npm install apollo-server-express apollo-server-core express graphql

npm install fastify mercurius
curl --request POST \
  --header 'content-type: application/json' \
  --url http://localhost:4000/graphql \
  --data '{"query":"query getBooks { getBooks { title author { name } } }"}'
npm install @graphql-codegen/cli
npx graphql-codegen init
npm run generate-gql-types