-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Batch query operations #517
Copy link
Copy link
Open
Labels
👻 Needs ChampionRFC Needs a champion to progress (See CONTRIBUTING.md)RFC Needs a champion to progress (See CONTRIBUTING.md)💭 Strawman (RFC 0)RFC Stage 0 (See CONTRIBUTING.md)RFC Stage 0 (See CONTRIBUTING.md)
Metadata
Metadata
Assignees
Labels
👻 Needs ChampionRFC Needs a champion to progress (See CONTRIBUTING.md)RFC Needs a champion to progress (See CONTRIBUTING.md)💭 Strawman (RFC 0)RFC Stage 0 (See CONTRIBUTING.md)RFC Stage 0 (See CONTRIBUTING.md)
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.