graphql/graphiql

Allow to run multiple operations (for query batching)

开放

#1,635 创建于 2020年8月7日

 (26 条评论) (3 个反应) (0 位负责人)TypeScript (1,785 个派生)batch import
good first issue

仓库指标

星标
 (15,473 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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:

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:

贡献者指南