I would like to have a query containing a check, for example when querying users, only users that have a non-null email are wanted. How could I add such check? Thanks!
users {
id,
username,
email
}
I would like to have a query containing a check, for example when querying users, only users that have a non-null email are wanted. How could I add such check? Thanks!
users {
id,
username,
email
}
GraphQL fields can have arguments. So you could pass an argument to your
users
field, namedonlyNonNullEmail: boolean
:Then, inside your resolve function: