router
router copied to clipboard
Query planner skips fetches when possible (based on @skip and @include usages) Already supported by node.js gateway
Is your feature request related to a problem? Please describe. It's reasonable for the query planner to make use of top-level @skip and @include usages in order to determine whether it can omit/ignore a FetchNode altogether and prevent an unnecessary call to a service when possible.
Describe the solution you'd like FetchNodes are appended with the sum of all "inclusion conditions" of the top-level fields. Each condition has a possible skip and include value, and those values can be either a Boolean literal (true/false) or a variable. During execution, the executor will reduce all of the conditions based on literal and variable values into a single "skip or include" result, and will execute or ignore that FetchNode based on the result.