The ReactRelayNetworkModern is a Network Layer for Relay Modern with various middlewares which can manipulate requests/responses on the fly (change auth headers, request url or perform some fallback if request fails), batch several relay request by timeout into one http request, cache queries and server-side rendering.
The three core assumptions that Relay makes about a GraphQL server are that it provides:
A mechanism for refetching an object.
A description of how to page through connections.
Structure around mutations to make them predictable.
The "mechanism for refetching an object" implies that each entity has a "global id", allowing to uniquely identify it based on its ID alone: content-123 instead of 123.
The Relay Network Layer is a middleware for GraphQL that bring in many very valuable features, most notably in regards to performances:
From https://github.com/relay-tools/react-relay-network-modern:
Its implementation will be a breaking change, as it requires several standards to be apply (https://facebook.github.io/relay/docs/en/graphql-server-specification.html):
The "mechanism for refetching an object" implies that each entity has a "global id", allowing to uniquely identify it based on its ID alone:
content-123
instead of123
.The "description of how to page through collections" implies that we restructure all items collections.