It would be great to have a way to see all the previous results within our resolver of the execution tree.
This could be something like this:
// These types should be coming from KGraphQL
data class ExecutionResult(val node: SelectionNode.FieldNode, val value: Any)
@NotIntrospected data class ExecutionResults(val previousResults: List<ExecutionResult>)
..
property<String>("myValue") {
resolver { myType, results: ExecutionResults ->
val grandparent = results.firstOrNull { it.node.name.value == "grandParent" } as GrandParentType
"This is a grand child of ${grandparent.name}"
}
}
It would be great to have a way to see all the previous results within our resolver of the execution tree.
This could be something like this: