rover icon indicating copy to clipboard operation
rover copied to clipboard

Generate query plan from a given subgraph list and operation

Open smyrick opened this issue 1 year ago • 1 comments

Description

Today rover supergraph compose allows you to generate the supergraph locally with all customizations of subgraphs. Composition is a static and analyzable process of Federation that is very helpful, but at runtime there is another feature that is also analyzable and that is Query Plans.

Query Plans contain lots of metadata about how a given operation will behave and for complex operations, debugging query plans can be a helpful way to find issues. Instead of having to start up a Router and inspect results the the Explorer UI or make requests to GraphOS, it would be helpful to generate those locally and be able to power other custom tooling.

rover supergraph plan --supergraph supergraph.graphqls --operation myQuery.graphql

Maybe passing a collection of operations here is also easier to do batch jobs

rover supergraph plan --supergraph supergraph.graphqls --operations operations.json

Things to consider

  • The query planner code is currently written in Javascript and will also have to compiled out so something Rover can call externally

smyrick avatar Dec 20 '23 23:12 smyrick