docs/docs/api-reference/relay-graphql-api/index.mdx
import GraphiQLIDE from '@site/src/components/GraphiQLIDE';
All GraphQL requests for Relay queries are made to the Relay GraphQL API.
All requests are POST requests to the /v1/relay endpoint.
The following types of requests can be made using the Relay GraphQL API:
The Relay GraphQL API provides support for batched requests over the
/v1/relay endpoint.
Example: using a client which supports batching (such as Apollo Client), we can send two query operations in one request:
<GraphiQLIDE
query={query first { author_connection(where: {id: {_eq: 1}}){ edges { node { id name username } } } } query second { author_connection(where: {id: {_eq: 2}}){ edges { node { id name username } } } } }
response={[ { "data": { "author_connection": { "edges": [ { "node": { "id": "WzEsIHB1YmxpYywgYXV0aG9yLCAxXQo=", "name": "Chris", "username": "urschris" } } ] } } }, { "data": { "author_connection": { "edges": [ { "node": { "id": "WzEsIHB1YmxpYywgYXV0aG9yLCAyXQo=", "name": "Blake", "username": "blake99" } } ] } } } ]}
/>