You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if var = true, directive is not included in the downstream query.
include in downstream query
Why:
The directives are not added to the list that needs to be included in the downstream query. (see Code). This is because the QueryTraverser.java used in VariableDefinitionFilter.java evaluates the arguments and ignores accordingly. (The QueryTraverser.java JavaDoc explains this as well)
Solution:
We did not find a way to change the behavior of QueryTraverser.java. As an alternative, implement a NodeVisitor and use in VariableDefinitionFilter.java. See an example implementation here.
The text was updated successfully, but these errors were encountered:
The core GraphQL specification includes the following directives:
@include(if: Boolean)
Only include this field in the result if the argument is true.@skip(if: Boolean)
Skip this field if the argument is true.More info about graphql directives in general here.
In graphql-orchestrator-java, we want these directives to be always included in the downstream query.
Problem
The @include and @Skip are not passed to downstream for the following scenarios:
Why:
The directives are not added to the list that needs to be included in the downstream query. (see Code). This is because the QueryTraverser.java used in VariableDefinitionFilter.java evaluates the arguments and ignores accordingly. (The QueryTraverser.java JavaDoc explains this as well)
Solution:
We did not find a way to change the behavior of QueryTraverser.java. As an alternative, implement a NodeVisitor and use in VariableDefinitionFilter.java. See an example implementation here.
The text was updated successfully, but these errors were encountered: