graphql / graphql/graphiql

Allow to run multiple operations (for query batching)

Open
#1,635 26 comments 3 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

Executing multiple queries in a single query is not part of the spec yet, but [it has been requested](https://github.com/graphql/graphql-spec/issues/375), and several servers already implement it (such as [Apollo](https://www.apollographql.com/blog/batching-client-graphql-queries-a685f5bcd41b/)).

Then, GraphiQL should allow to execute multiple operations against the server. However, when there are multiple operations in the document, the Run button only allows to select either one, but not many of them, or all of them.

Please notice in this screenshot, the 2 operations are expected to be executed together, but that's not possible:

Screenshot 2020-08-07 at 10 46 55 PM

## Proposal

Add a configuration option `"runMultipleQueries"` which, when `true`, if there is more than 1 operation in the document, also adds entry `"Execute all"` in the Run button dropdown:

Screenshot 2020-08-07 at 10 50 54 PM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.