question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to run multiple operations (for query batching)

See original GitHub issue

Executing multiple queries in a single query is not part of the spec yet, but it has been requested, and several servers already implement it (such as Apollo).

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:26 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
sidk-10commented, Sep 22, 2020

Hey @acao I would like to contribute to this! It would be great if you could brief me about the same. I have read the development and contribution guidelines and have gone through the codebase.

1reaction
sidk-10commented, Sep 27, 2020

Hey @acao I have submitted the PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Batching Client GraphQL Queries
In GraphQL apps, batching usually takes one of two forms. The first form takes all operations and combines them into a single operation...
Read more >
Executing multiple queries in a single operation in GraphQL
In this case, all queries are combined together, and executed as a single operation. That means that they will reuse their state and...
Read more >
Executing multiple queries concurrently
Multiple queries can be combined together, and executed as a single operation, reusing their state and their data. In this case, if a...
Read more >
Multiple GraphQL Operations in a Request - Dgraph
When an operation contains multiple queries, they are run concurrently and independently in a Dgraph readonly transaction per query. When an operation contains ......
Read more >
Multiple-Query Execution - GraphQL by PoP
GraphiQL currently does not allow to execute multiple queries as a single operation. To overcome this problem, if the operation name is __ALL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found