router icon indicating copy to clipboard operation
router copied to clipboard

Query planner skips fetches when possible (based on @skip and @include usages) Already supported by node.js gateway

Open NoobMaster-96 opened this issue 3 years ago • 22 comments

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.

NoobMaster-96 avatar Nov 22 '22 07:11 NoobMaster-96