Providing Technology Training and Mentoring For Modern Technology Adoption
Web Age Aniversary Logo
US Inquiries / 1.877.517.6540
Canadian Inquiries / 1.877.812.8887
Course #:TP3056

Introduction to GraphQL with Apollo Server Training

Training 4 Developers’ Introduction to GraphQL with Apollo Server training course teaches attendees how to build a GraphQL server powered by Node.js and Apollo Server. Students develop a real-world GraphQL server from which they can query data, apply mutations, and connect to via subscriptions. The primary focus on the class is the GraphQL language including its type system. The Apollo Server platform provides a useful way to learn the GraphQL language. While the focus of the course is GraphQL itself, because of how Apollo Server is utilized the student will learn a lot about Apollo Server and Node.js as well. As part of the course, students will query data from an existing REST API to show how GraphQL can be incrementally adopted within existing server API infrastructures.

Students will build a GraphQL server project using JavaScript, Node.js, and the Apollo Server. Developers can do wonders with GraphQL, it’s a great replacement for other API schemes such as REST APIs and SOAP. Using the GraphiQL IDE, students will perform queries, mutations, and subscriptions. Also, students will explore how to call the GraphQL server through a normal AJAX call. The primary focus will be thinking in GraphQL and learning the type system including objects, input objects, interfaces, and unions. Also, query features such as fragments, inline fragments, operation names, variables, and directives will be explored.

Objectives

Develop real-world GraphQL server using Node.js and Apollo Server

Think in terms of GraphQL, and how it differs from other API schemes

Learn the GraphQL Type System

Code Resolver Functions

Learn the Query, Mutation and Subscription GraphQL syntax

Execute Queries, Mutations and Subscriptions in the GraphiQL IDE

Write AJAX Calls to call the GraphQL server

Prerequisites

Attendees should have a good working knowledge of ES2015 JavaScript. Experience writing Node.js application is a huge plus. Students are strongly encouraged to take the Introduction to JavaScript course if they have no JavaScript experience.

Duration

Two days

 

Outline of Introduction to GraphQL with Apollo Server Training

The course can be taught in either the JavaScript or the TypeScript languages. Knowledge of JavaScript is needed for both language versions of the course. Knowledge of TypeScript is NOT needed for the TypeScript version.

Chapter 1. Introduction to GraphQL

What is GraphQL?

GraphQL compared to REST Services

Thinking in GraphQL

Benefits of GraphQL and Apollo Server

Node.js and NPM (covered as needed)

Debugging Node.js Applications

ES2015 + JavaScript Syntax (covered as needed)

Chapter 2. Data Sources & Resolvers

Use Node.js to Access Asynchronous Data Source

Asynchronous JavaScript Programming (covered as needed)

Closures, Callbacks, Promises, Async/Await (covered as needed)

Wrap a REST API in GraphQL

Implement Resolvers

Default Resolvers

Query and Mutation Resolvers

Wire up Subscriptions

Resolve Type

Chapter 3. GraphQL Types and Server Configuration

Schema, Object, Input, Scalar, & List Types

Interface Types

Understanding Fields, Arguments and Resolve

Enum, Union, Interface Types

Inline Fragments

Directives

Introspection Queries

Chapter 4. GraphQL Queries

What is a Query?

GraphQL Query Syntax

Use GraphiQL IDE to perform queries

Use GraphiQL IDE to perform queries

Passing arguments into queries.

Renaming a field with aliasing.

Breaking a large query into fragments.

Nesting many fragments.

Chapter 5. GraphQL Mutations

What is a Mutation?

GraphQL Mutation Syntax

Use GraphiQL IDE to perform mutations

Purpose of Input Object Type

Mutation Queries with Variables

Structure Mutation Query Results

Handling Error from Failed Mutations

Chapter 6. GraphQL Subscriptions

What is a Subscription?

GraphQL Subscription Syntax

Use GraphiQL IDE to perform subscriptions

Code subscription resolver

Chapter 7. Web Browser Client

Using the Fetch API to perform a Query

Using the Fetch API to perform a Mutation

Using the Web Socket API to perform a Subscription

 

We regularly offer classes in these and other cities. Atlanta, Austin, Baltimore, Calgary, Chicago, Cleveland, Dallas, Denver, Detroit, Houston, Jacksonville, Miami, Montreal, New York City, Orlando, Ottawa, Philadelphia, Phoenix, Pittsburgh, Seattle, Toronto, Vancouver, Washington DC.
US Inquiries / 1.877.517.6540
Canadian Inquiries / 1.877.812.8887