given the following schema:
query("outer") {
resolver { ->
Outer(Inner("test"))
}
}
type<Inner> {
property("testProperty") {
resolver { "this should be resolved" }
}
property("unwantedProperty") {
resolver {
"This code should not be executed as it could be an expensive calculation" // <--- here
}
}
}
and the following query:
{
outer {
...TestFragment
inner { testProperty } # override what declared in TestFragment, return only `testProperty`
}
}
fragment TestFragment on Outer {
inner { name, testProperty, unwantedProperty }
}
we got the following result, which is fine (or is it?):
{"data":{"outer":{"inner":{"testProperty":"this should be resolved"}}}}
The issue is, the unwantedProperty resolver is still getting executed because that field is declared in TestFragment.
Expected behavior is that this resolver is ignored because it is not requested by caller