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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access