The @skip built-in directive may be provided for fields, fragment spreads, and inline fragments, and allows for conditional exclusion during execution as described by the if argument.
The @include built-in directive may be provided for fields, fragment spreads, and inline fragments, and allows for conditional inclusion during execution as described by the if argument.
The current implementation differs from the specs, as the content affected by these directives is instead being returned as null.
GraphQL query:
{
hero {
name @skip(if: true)
}
}
Response:
{
"data": {
"hero": {
"name": null
}
}
}
This works correctly when the directive is applied to the query itself:
@skip specs:
@include specs:
The current implementation differs from the specs, as the content affected by these directives is instead being returned as null.
GraphQL query:
Response:
This works correctly when the directive is applied to the query itself:
GraphQL query:
Response: