Hello, I have a question regarding GraphQL @skip
and @include
directives. If I have a query like so:
query getUsers {
users {
id
name @include(if: false)
email
role
}
}
This stops the name
field from being returned in the Graph response. However, does this still send the request for name
to the backend layer and it simply doesn’t return it in the response? So if I set set name
to name @include(if: false)
is this the same as sending:
query getUsers {
users {
id
email
role
}
}
Finally, how does @skip
differ from @include
? Is it just the opposite or is there some functional difference?