I want to have a single query to take in a bool? Active parameter which could possibly be null.
Although, from experimenting I can either have a query which always excepts a value from Active OR just not use the filter at all.
Errors that I get from passing null:
The provided value for filter `eq` of type BooleanOperationFilterInput is invalid. Null values are not supported
Query that I am using to show active/inactive
query getOrgsByPartner($partnerId: UUID!, $active: Boolean, $take: Int, $after: String) {
organisations(
first: $take
after: $after
where: {
partner: { key: { eq: $partnerId } },
isActive: { eq: $active }
}
) {
nodes {
key
displayName
email
isActive
}
}
}
For the meantime, I have just created 2 separate queries and just handle them on the client with a conditional operator.