Book Image

Learning GraphQL and Relay

By : Samer Buna
Book Image

Learning GraphQL and Relay

By: Samer Buna

Overview of this book

<p>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.</p> <p>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.</p>
Table of Contents (15 chapters)

Chapter 6. Relay Variables and Object Identification

In this chapter, we'll explore how to work with Relay variables, then explore the object identification model in Relay using its Node interface. To work with Relay variables, we'll implement a search feature for our inspirational quotes application. To see the Node interface in action, we'll start implementing a likes counter on every quote.

The topics we'll cover in this chapter are as follows:

  • Relay variables

  • Relay global identifiers

  • Relay's Node interface