Let’s Learn GraphQL#
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 8 hour workshop we will create a GraphQL server with Apollo Server, connect it to a Postgres database in Heroku to have a fully functional GraphQL Server.
After that we will jump to the frontend using React and Apollo to query and mutate a GraphQL Endpoint easily.
- Node installed, I have version 10.3.0 but anything that supports async await is great!
- I use yarn but npm is 💯
- Heroku Account - https://heroku.com/
- Postgres DB in Heroku - Video on how to do it: https://cdn.rawgit.com/SaraVieira/graphql-workshop/13d73f3b/howtoheroku.mp4
- CodeSanbox Account is preferred so you can keep all the files in your account
- React knowledge
- An overview of 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
This workshop is free. Tickets would be distributed through a diversity ticket program. Ticket will include a free ticket to the actual conference. Apply for a diversity ticket.
GraphQL Schema Design#
Building a brand new GraphQL API? Migrating from a REST API? If you are interested in designing a GraphQL schema that is great to use by clients and stands the test of time, this workshop is for you.
Alternating between presentations and hands on exercices, this workshop will cover:
- Good development workflows to build GraphQL APIs
- Common anti-patterns
- How to build an evolvable schema
- How to approach a migration from another API
- Domain driven design & GraphQL
- How to design errors
- Must-have tooling for building GraphQL APIs at scale
- Many other great practices used in the largest GraphQL APIs out there!
For the exercices, we will only use the GraphQL SDL (Schema Definition Language), meaning you'll get to learn no matter what language you use to build your schema.
Building a GraphQL API with node.js#
Learn how to build a GraphQL API from scratch using Node.js. This workshop is aimed at GraphQL beginners, but you probably have built an API server before. We'll go through the basics of building a GraphQL API server, wrap a REST API with it and then connect it to a database.
The following topics will be covered:
- Basics of GraphQL on a server
- Resolver model
- Ways to define a GraphQL schema
- Schema first design
- Evolving the backing data service, without changing the schema
- Wrapping a REST API with GraphQL gateway
- Connecting to a database
Workshop will have an interactive format, where I will livecode, while explaining what I'm doing. There will also be short presentations and non-coding parts, where I will explain some of the advanced concepts.
At the end of the workshop you should be comfortable building a GraphQL API with node.js.
This workshop is only offered as a bundle deal with a conference.
Advanced GraphQL Concepts#
You understood the basics of GraphQL or even worked with it in a production environment? Then this workshop is for you. While GraphQL comes with many benefits it also requires some rethinking. For example how to secure your server from malicious queries or how to give different users access to different parts of the Schema.
We will answer these questions and many more by covering the following topics:
- Rate limiting
- Persistent Queries
- Schema stitching
- API Design
Every topic is covered by a 20 minute presentation followed by a hands on exercise. After every exercise we will briefly glance at a solution and move on to the next topic. For the exercises you can choose the programming language and tools of your choice. Just come prepared with a working GraphQL setup.
To goal is that by the end of the day you are way more comfortable making design decisions for your GraphQL environment.