Learning GraphQL and Relay

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

Learning GraphQL and Relay

Samer Buna

1 customer reviews
Build data-driven React applications with ease using GraphQL and Relay
Mapt Subscription
FREE
$29.99/m after trial
eBook
$19.60
RRP $27.99
Save 29%
Print + eBook
$34.99
RRP $34.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$19.60
$34.99
$29.99p/m after trial
RRP $27.99
RRP $34.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning GraphQL and Relay Book Cover
Learning GraphQL and Relay
$ 27.99
$ 19.60
Machine Learning: End-to-End guide for Java developers Book Cover
Machine Learning: End-to-End guide for Java developers
$ 75.99
$ 53.20
Buy 2 for $35.00
Save $68.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

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

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
React.js Essentials Book Cover
React.js Essentials
$ 23.99
$ 16.80
Data Visualization with D3.js Cookbook Book Cover
Data Visualization with D3.js Cookbook
$ 26.99
$ 18.90
Node.js Design Patterns - Second Edition Book Cover
Node.js Design Patterns - Second Edition
$ 39.99
$ 28.00
ReactJS by Example - Building Modern Web Applications with React Book Cover
ReactJS by Example - Building Modern Web Applications with React
$ 35.99
$ 25.20
ReactJS Cookbook Book Cover
ReactJS Cookbook
$ 39.99
$ 28.00