0

I have this enum:

enum Status {
    DEAD
    SICK
    HEALTHY
}

Using that enum type, how can I query people that are alive (Sick and healthy)?

query GetPeopleByStatus($status: EnumStatus){
        people: peopleMany(filter: { status: $status} }) {
            ${PEOPLE_FIELDS}
        }
    }

I need to be able to pass to this query something like: ["SICK", "HEALTHY"] but this method won't work with lists. It won't work if I use $status: [EnumStatus] either. The only case I was successful was doing something like status: 'HEALTHY'

Is this possible? Do I need a custom resolver for this?

danielrvt
  • 10,177
  • 20
  • 80
  • 121

0 Answers0