Skip to content

vnovick/react-india-migrating-rest2graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to moving-from-rest-to-graphql 👋

Hi, my name is Vladimir Novick and this is the source material for

Moving from REST to GraphQL workshop.

TwitterGPL-3.0 LicenseAll ContributorsPRs WelcomeCode of Conduct

Pre-Workshop Instructions/Requirements

  • Setup the project (follow the setup instructions below) (~5 minutes)
  • 📺 Install and setup Zoom on the computer you will be using (~5 minutes)

System Requirements

All of these must be available in your PATH. To verify things are set up properly, you can run this:

git --version
node --version
npm --version

If you have trouble with any of these, learn more about the PATH environment variable and how to fix it here for windows or mac/linux.

Setup

For analyzing REST API we will need Postman so download it.

  1. Clone the repo
git clone git@github.com:vnovick//react-india-migrating-rest2graphql.git
  1. Install all frontend dependencies
cd frontend
npm install
  1. Install all backend dependencies
cd api
npm install

Running the app

To get frontend app up and running

cd frontend
npm start

This should start up your browser. If you're familiar, this is a standard react-scripts application.

To get api server running

cd api
npm start

This will provide you REST backend that we will convert to GraphQL during our workshop

Schedule

Workshop schedule

  • Logistics
  • Problems with REST
  • GraphQL query language
  • GraphQL endpoint setup
  • Design a GraphQL Schema by analyzing REST api
  • Implementing temporary resolvers for Queries
  • Batch REST requests with REST Data Source
  • Migrate to the same data source
  • Implement Mutations

Working through the exercises

Every exercise will have a separate branch for it. You move between exercise by changing branches.

In most exercises you will see TODO: comments in the code. They serve as guidelines where you should write your solutions You will also see a list of files that you will be required to modify. Every file will have .final.js version. If you are stuck, you are welcome to peak at the final solution

Exercise 1 - exploring project REST api

Start by cloning the exercise repo.

git checkout exercise-1

follow Instructions.md

Exercise 2 - Explore GraphQL queries and mutations

git checkout exercise-2

follow Instructions.md

Exercise 3 - GraphQL endpoint setup

  • git checkout exercise-3
  • install dependencies:
cd api
npm install

Exercise 4 - Design GraphQL Schema

  • git checkout exercise-4
  • install dependencies:
cd api
npm install

Exercise 5 - Implementing temporary resolvers for Queries

  • git checkout exercise-5
  • install dependencies:
cd api
npm install

Exercise 6 - Batch REST requests with REST Data Source

  • git checkout exercise-6
  • install dependencies:
cd api
npm install

Exercise 7 - Migrate to the same data source

  • git checkout exercise-7
  • install dependencies:
cd api
npm install

Exercise 8 - Implement Mutations and Input types

  • git checkout exercise-8
  • install dependencies:
cd api
npm install

Exercise 9 - Migrating Client side to GraphQL

  • git checkout exercise-8
  • install dependencies:
cd api
npm install

cd frontend
npm install

Author

Hi, I am 👤 Vladimir Novick

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

This material is available for private, non-commercial use under the GPL version 3. If you would like to use this material to conduct your own workshop, please contact me at vnovick@gmail.com


This README was generated with ❤️ by readme-md-generator

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Vladimir Novick

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

About

React India workshop for moving from REST to GraphQL

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published