Graeme CouparGraeme Coupar

Grafbase now supports batching, as described in the Batching RFC. This allows users to make multiple independent GraphQL requests in a single HTTP request.

Where a normal GraphQL over HTTP request looks like:

{ "query": "query($id: ID!){user(id:$id){name}}", "variables": { "id": "QVBJcy5ndXJ1" } }

Batching can be enabled by sending in a list instead:

[ { "query": "query($id: ID!){user(id:$id){name}}", "variables": { "id": "QVBJcy5ndXJ1" } }, { "query": "mutation{foo}" } ]

Note that batching is only supported on HTTP POST requests, not GET requests.

It also cannot be used for subscription requests or with queries that require incremental delivery or SSE, such as those using @defer.

We'd love to hear your feedback and ideas, so join us on Discord.