Learning GraphQL and Relay

Build data-driven React applications with ease using GraphQL and Relay

Learning GraphQL and Relay

This ebook is included in a Mapt subscription
Samer Buna

1 customer reviews
Build data-driven React applications with ease using GraphQL and Relay
$10.00
$34.99
RRP $27.99
RRP $34.99
eBook
Print + eBook
Preview in Mapt

Book Details

ISBN 139781786465757
Paperback218 pages

Book Description

There’s a new choice for implementing APIs – the open source and Facebook-created GraphQL specification. Designed to solve many of the issues of working with REST, GraphQL comes alongside RelayJS, a React library for querying a server that implements the GraphQL specification. This book takes you quickly and simply through the skills you need to be able to build production ready applications with both GraphQL and RelayJS.

Beginning with a solid foundation in the GraphQl specification, this book swiftly moves to how a data layer can be implemented for your web application using Relay. Get to grips with GraphQL and Relay concepts creating data containers, data masking, and more as your progress towards building a production-ready application.

Table of Contents

Chapter 1: An Introduction to GraphQL and Relay
What is GraphQL?
What is Relay?
Why GraphQL?
Why Relay?
Setting up a simple GraphQL server
Summary
Chapter 2: The Query Language
Documents and operations
Fields
Variables
Directives
Aliases
Fragments
Mutations
Summary
Chapter 3: The GraphQL Schema
The schema object
Introspection
The type system
The resolve function
Validation
Versioning
Summary
Chapter 4: Configuring React Applications to Use Relay
The example GraphQL schema
The quotes library
Setting up Webpack
Using GraphQL without Relay in React applications
Relay containers
Summary
Chapter 5: Making GraphQL Queries Relay-Compliant
Transforming GraphQL queries for Relay
Root-level field for the quotes library
First query operation with Relay
Relay's connection model
Summary
Chapter 6: Relay Variables and Object Identification
Implementing search
Implementing likes
Summary
Chapter 7: Relay Mutations
Relay-compliant GraphQL mutations
Relay.Mutation
Optimistic updates
Summary
Chapter 8: Deploying to the Cloud
Preparing for deployment
Deploying on EC2
Deploying on Heroku
Summary

What You Will Learn

  • Understand what problem GraphQL solves and how it differs from traditional REST architectures
  • Create a GraphQL server
  • Develop modular and maintainable GraphQL code
  • Grasp how to define GraphQL mutations
  • Comprehend how to define GraphQL queries
  • Modify a GraphQL server to be Relay-compliant
  • Develop a Relay client-side application with ReactJS that consumes a GraphQL endpoint

Authors

Table of Contents

Chapter 1: An Introduction to GraphQL and Relay
What is GraphQL?
What is Relay?
Why GraphQL?
Why Relay?
Setting up a simple GraphQL server
Summary
Chapter 2: The Query Language
Documents and operations
Fields
Variables
Directives
Aliases
Fragments
Mutations
Summary
Chapter 3: The GraphQL Schema
The schema object
Introspection
The type system
The resolve function
Validation
Versioning
Summary
Chapter 4: Configuring React Applications to Use Relay
The example GraphQL schema
The quotes library
Setting up Webpack
Using GraphQL without Relay in React applications
Relay containers
Summary
Chapter 5: Making GraphQL Queries Relay-Compliant
Transforming GraphQL queries for Relay
Root-level field for the quotes library
First query operation with Relay
Relay's connection model
Summary
Chapter 6: Relay Variables and Object Identification
Implementing search
Implementing likes
Summary
Chapter 7: Relay Mutations
Relay-compliant GraphQL mutations
Relay.Mutation
Optimistic updates
Summary
Chapter 8: Deploying to the Cloud
Preparing for deployment
Deploying on EC2
Deploying on Heroku
Summary

Book Details

ISBN 139781786465757
Paperback218 pages
Read More
From 1 reviews

Read More Reviews