O'Reilly logo
live online training icon Live Online training

Building Data APIs with GraphQL - 1 Day Class

Get started with the GraphQL query language and runtime for your APIs

Samer Buna

GraphQL provides a common interface between clients and servers for fetching and manipulating data. It's a query language for clients and a runtime for servers, with the goal of giving clients more power into what data they can ask for, the format of that data, how much of it to fetch, and much more. With client-specified queries, clients can retrieve the flexible data they need from the server using a single smart endpoint. The GraphQL runtime is language agnostic, and there are several implementations available, including a JavaScript reference implementation by Facebook.

Join expert Samer Buna for a hands-on, in-depth exploration of GraphQL. You’ll learn everything you need to get started with GraphQL, discover why it's necessary for modern web app architecture, and see how it compares to the alternatives. Along the way, you'll explore the theory and design decisions behind GraphQL and all the powerful features that ship with any GraphQL runtime implementation. You'll also learn how to create a simple GraphQL server.

What you'll learn-and how you can apply it

  • GraphQL features and uses
  • How GraphQL is different from alternatives and why that matters
  • The GraphQL schema language and how to work with it in JavaScript
  • GraphQL's introspective nature

And you’ll be able to:

  • Use GraphQL queries, mutations, fragments, variables, aliases, directives, interfaces, and unions
  • Build a simple GraphQL server in Node.js
  • Work with GraphQL with a backend data service

This training course is for you because...

  • You're a backend engineer who designs APIs, and you want to learn what is different about GraphQL.
  • You're a frontend engineer who works with applications that consume data APIs, and you want to make them work with GraphQL-based APIs.

Prerequisites

  • A basic knowledge of programming (variables, control structure, data structures, etc.)
  • Familiarity with JavaScript syntax and tools

Materials or downloads needed in advance:

  • A machine with a modern browser and Node 8.9.4 or later installed (Please run "node --version" and make sure you see 8.1.4 (or higher).)

About your instructor

  • Samer Buna has over 20 years of experience in software development, during which he has worked on web and mobile applications development, API design, functional programming, optimization, system administration, database management, and scalability. Samer is the author of several technical books and online courses on topics such as Node.js, React, and GraphQL. You can follow his latest work over at jsComplete.com and EdgeCoders.com.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Introduction to GraphQL (50 minutes) - Lecture and exercises: The terminologies and design principles of GraphQL; the GraphQL way of creating APIs for hierarchical data; how GraphQL is product-centric with client-specified queries; how GraphQL plays well with existing code; how to work with the GraphQL editor

Break (10 minutes)

The GraphQL query language (50 minutes) - Lecture and exercises: The query syntax; variables; field aliases; fragments; directives; mutations; GraphQL's introspective nature; how to use GraphQL to write declarative data requirements

Break (10 minutes)

The GraphQL runtime (50 minutes) - Lecture and exercises: The GraphQL runtime; schemas; objects; fields; transport channels; type system; composition; introspection; mutations

Quiz, wrap-up, and Q&A (10 minutes)