GraphQL Training

GraphQL Training

Fullstack GraphQL

Length 1 day

The GraphQL API is only half of the picture. Sure, it answers questions, but who is asking the questions? A client is any application that consumes data from your API. Today, we're going to build clients. We're gonna examine the challenges to building clients. And we're going to look at the tools that were designed to crush those challenges. Along the way you will learn more GraphQL, you will get stronger with JavaScript, and you're going to learn React.

Unions & Interfaces

First Thing

The day begins with an in-depth overview of unions and interfaces. These are advanced GraphQL techniques for modeling domain objects. We'll learn how to identify and write queries for unions and interfaces using fragments. We'll build unions and interfaces into our own API. We'll understand why we use them, when to use them, and how to implement them effectively.

Topics

When to use unions?Handling an agenda with unionsHandling search results with a unionWhen to use interfaces?Handling an agenda with interfacesImproving the Pet Library with interfacesUnderstanding the `__resolveType` resolver

Apollo Client

Before Lunch

After the break, we'll turn to the consumer of GraphQL, the client. A GraphQL client can be any type of application that consumes the data on your API. Clients include web sites, but they also include native apps, virtual reality applications, even command line applications. Any client that supports JavaScript can take advantage of Apollo Client, a tool that helps us work faster and more efficiently by managing network requests and caching data. In this next block, we're going to learn to use it.

Topics

GraphQL Requests with HTTPUsing the Apollo Client to send QueriesUnderstanding the `gql` function and ASTsMutating data with the Apollo ClientWorking with the `InMemoryCache`Changing local data stored in the CacheHandling Network Requests with `ApolloLink`

Apollo And React

After Lunch

Currently, React is the most popular library for building user interfaces. Since we wrote our first book on React, twice, we're going to use it to build a client. Together we are going to build a robust web client that uses the latest React goodies like Hooks, Context, and Suspense. If you have never used React before, don't worry we've got you covered. At the end of this segment, you will feel confident about being able to build your own web client.

Topics

General React OverviewCreate React AppBuilding UI components with ReactConsuming data with the `useQuery` HookChanging data with the `useMutation` HookUnderstanding ContextInteracting with Apollo Client Directly

Lab: Build an API

End of the Day

With all their new knowledge, students will want to write code, they'll want to build apps. We're going to let them do it. In this section we are going to build a client for a GraphQL API. We'll provide the API, or you can use your own. Students can build a web client with React, Vanilla JavaScript, or their favorite UI library. If you don't have a favorite UI library, because you are a backend developer, you'll get to build a CLI.


GraphQL

GraphQL is a query language for your APIs, and GraphQL is everywhere. Whether you're a front-end developer trying to load data predictably into your UIs, a back-end developer looking to wrangle microservices, or a manager hoping to tap into the performance and productivity benefits of GraphQL, we have practical, hands-on courses that will fast-track your progress at creating production-ready services with GraphQL. Learn the latest from the authors of O'Reilly's Learning GraphQL.

"Great job of both answering questions & keeping the pace moving in class!"JavaScript Kickoff Student
Custom Curriculums

Any of our classes can be customized to fit your specific needs. We can create the perfect GraphQL training course for your team. Our materials are designed to be isolated, combined, and rearranged to create the perfect class.