Workshop: GraphQL with Sara Vieira
When it comes to requesting data from an API, according to many people, GraphQL is the logical evolution of REST. It helps to get exactly the data you need, no more and no less.
So you want to learn GraphQL? That is awesome! But like any other technology it's not easy to get started and get the basics of it. Mainly because all the docs are spread all over the place.
In this full-day workshop we will create a GraphQL server, connect it to a Postgres database in Heroku to have a fully functional server. After that we will jump to the frontend using React and Apollo to query and mutate a GraphQL Endpoint easily.
What you need for the workshop
- A laptop
- Node, 7.6.0 or higher
- Yarn or npm
- Git (also clone firstname.lastname@example.org:SaraVieira/graphql-workshop.git)
- A Heroku Account
- Postgres DB in Heroku - Video on how to do it https://cdn.rawgit.com/SaraVieira/graphql-workshop/13d73f3b/howtoheroku.mp4
- A CodeSandbox Account is preferred so you can keep all the files in your account
- React knowledge
What you’ll build
In this workshop you’ll build a server with a GraphQL interface and a frontend built with React to connect to the backend by using Apollo.
What you’ll learn
- What GraphQL is
- The basics of a querying with GraphQL
- The basics of a mutations in GraphQL
- Connect to a Postgres DB
- Using context
- Make multiple requests in one Query
- Making simple queries with React and React-Apollo
- Making advanced queries with React and React-Apollo
- Creating our own query component
- Mutations with React Apollo
- Updating the UI automatically after a mutation
- Using pagination
Sara Vieira is a frontend developer at YLD, open sorcerer, maker of useless modules, Blogger, Drummer and horror movie fan girl. You can see how much she likes GraphQL on her website https://iamsaravieira.com/ and you can find her on Twitter @NikkitaFTW