The GraphQL backend and microservices

Everything we've discussed so far about Relay is stuff that's in the browser. Relay needs to send it's GraphQL queries somewhere. For this, we need a GraphQL backend. This is pretty easy to implement, using Node.js and a handful of GraphQL libraries. We create what's called a schema, describing all the datatypes, queries, and mutations that will be used.

In the browser, Relay helps you scale your applications by reducing data-flow complexity. You have a means to declare what data is needed, without worrying about how it is fetched. It's the schema in the backend that actually needs to resolve this data.

This is another scaling problem that GraphQL helps address. Modern web applications are composed out of microservices. ...

Get React and React Native now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.