Implement a method to_document on QueryPlan to create an ExecutableDocument.
Here is an example of how the ExecutableDocument should look like when rendered:
{
QueryPlan {
Sequence {
Fetch(service: "SubgraphA") {
updateInAOne: updateFooInA {
id
bar
}
}
Fetch(service: "SubgraphB") {
updateInBOne: updateFooInB {
id
baz
}
}
}
Fetch(service: "SubgraphA") {
updateInATwo: updateFooInA {
id
bar
}
}
}
}
Technical Requirements
to_doc on QueryPlan<A> to create an ExecutableDocument.model.rs