Back to Graphql Engine

Relay GraphQL API Reference

docs/docs/api-reference/relay-graphql-api/index.mdx

2.49.41.6 KB
Original Source

import GraphiQLIDE from '@site/src/components/GraphiQLIDE';

Relay GraphQL API Reference

Introduction

All GraphQL requests for Relay queries are made to the Relay GraphQL API.

Endpoint

All requests are POST requests to the /v1/relay endpoint.

Request types

The following types of requests can be made using the Relay GraphQL API:

Batching requests

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" } } ] } } } ]} />