@SKIP and @INCLUDE Directives
The directives @skip and @include allow conditional inclusion of fields at query time.
-
@skip(if: <Boolean>): When the if condition isTRUE, the field is omitted from the output; whenFALSE, the field is returned. -
@include(if: <Boolean>): When the if condition isTRUE, the field is returned; whenFALSE, the field is omitted.
Limitations:While @skip and @include accept a Boolean if argument, using GraphQL variables as the if argument is not supported. The condition must be specified as a constant Boolean expression in the query text.