Skip to content

Batch query operations #517

Open
Open
@dead-claudia

Description

@dead-claudia

This is a restricted version of #375.

I have this giant thing I was looking at doing with GH's GraphQL API, but I ran into a stumbling block: I would need to issue a single request for each set of values rather than just reusing the query and plugging each variable in appropriately.

Instead, could we allow something like this: {"query": "...", "variables": [...]}, returning an array of "data" results rather than a single "data" object? Instead of "variables" being a single object, it's specified as an array of objects, where each entry is itself a standard variables object. This doesn't go as far as enabling variable dependencies like in #375, but it does allow a broad degree of batching that can be (and already is) optimized to death by database engines and other querying engines.

Server-side, this could be merged into a single tree with the parameters as array views at each position. This enables a broad array of potential optimizations without much cost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    👻 Needs ChampionRFC Needs a champion to progress (See CONTRIBUTING.md)💭 Strawman (RFC 0)RFC Stage 0 (See CONTRIBUTING.md)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions