1

I have a handful of ENUM type fields and I would like to do a where filter where the field value is ANYTHING. Basically, I want is where {fieldName_is_set: true}`

Does something like this exist? The only way I can think to do this is: where: { fieldNam_in: [all the enum values]}

I'm not a fan of this approach because it requires me to maintain that list of all the enum values.

Corey Snyder
  • 236
  • 1
  • 3
  • 12

1 Answers1

1

If the field is nullable, then you can use the following filter to match any enum value:

where: { NOT: [{ fieldNam: null }]}

If the field is non-null, then simply omitting the filter altogether will match any value.

Daniel Rearden
  • 80,636
  • 11
  • 185
  • 183