Description
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.