-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
The or
operator is supported but it doesn't support column filters.
Attempting to make the following query will yield an error:
employees(
first: 5,
where: {
age_gt: 21,
or: [
{ status: "active" },
{ stage:"review" }
]
}
) {
id
name
age
contactAddress
}
}
This error will be returned by the Graph Node:
ClientError: Filter must by an object
Normally, GraphQL supports this syntax.
For now, the fix is to remove age_gt
from the top-level column filter, and repeat it under each or
object, like so:
where: {
or: [
{ age_gt: 21, status: "active" },
{ age_gt: 21, status: "review" }
}
}
But this approach leads to a lot of duplicated code.
Discord Confusion
There has been quite a bit of confusion about this in the Discord server, e.g. this message.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request