How to Make Sure Your SaaS Product is a Safe One - Security Tips

Here are some numbers: Facebook did the math and concluded that the time needed to interact with their app on Android “improved by an average of 900 ms” after fully converting to Relay Modern.

New Relay’s bundle size got reduced to about 20 percent of what it used to be.

On top of five-times smaller bundle size, applications using Relay Modern will get query and mutation results significantly faster. An example of such optimisation is extracting queries and mutations during the build time and assigning IDs to them. This means that the client no longer has to send long GraphQL query strings that have to be processed on the server later on. Instead, a simple query identifier is sent and the server immediately knows which query to respond to. As Lee Byron wrote: “The Relay compiler extracts collocated GraphQL snippets from across an app, constructs the necessary queries, saves them on the server ahead of time, and outputs artefacts that the Relay runtime uses to fetch those queries and process their results at runtime.”

Note: Constructing a set of predefined queries in the build phase has many benefits outside of the performance, and if you are interested in this topic, here is a great article written by one of the Meteor and Apollo client creators, Sashko Stubailo.

Relay Modern is easier to learn

One of the most important changes in this matter is an amazing update to mutations API. This allows performing mutations in a simple and easily explicable way, similar to how “normal” GraphQL mutations are performed. Just take a look at the example. If you open the link, you will see another amazing feature, which is updating the client optimistically, based on expected new value.

I Like this POST

Get Our Infopack

Best quick guide to start working with us.