Handling conditional directives (@include and @skip) in middleware - query analyzing #7131
Unanswered
mbenedykconfigit
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have encountered a challenge that I need assistance with.
My current implementation relies on a custom directive, and I need to count its occurrences on the backend and perform specific actions based on the total count at the end of the operation. To achieve this, I am using middleware to inspect
SyntaxNodes
and check the Directives collection for my custom directive.However, I have encountered a problem when queries contain
@include
or@skip
directives. To accurately count the occurrences of my custom directive, I need to account for the@include
and@skip
conditions and stop counting in cases where sub-nodes are excluded or skipped.Is there a method to resolve the values of
@include
and@skip
directives based onDirectiveNode
andISelectionNode
types without manually matching the variables used within them to the provided variables?Any guidance or suggestions on how to handle this scenario would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions