cfree
03/15/2019, 1:00 AMconst offices = [
'PRESIDENT': 'President',
'VICE_PRESIDENT': 'Vice President',
'SECRETARY': 'Secretary',
'TREASURER': 'Treasurer',
];
return ctx.db.query.users(
{
where: {
AND: [
// Works fine
{ accountStatus: 'ACTIVE' },
// Works fine
{ accountType_in: args.accountTypes },
// Returns nothing
{ office_not_in: Object.keys(offices) },
],
},
},
info,
);
Schema:
enum Office {
PRESIDENT
VICE_PRESIDENT
SECRETARY
TREASURER
}
type User {
...
office: Office
}cfree
03/15/2019, 1:02 AMAND, OR, NOT, office_in, office_not, and office_not_in, but I can’t crack this onecfree
03/15/2019, 1:02 AMcfree
03/15/2019, 1:19 AMoffice: null, works 🤦jblevins
03/15/2019, 2:20 AMlawjolla
03/15/2019, 7:05 AMcfree
03/15/2019, 2:11 PMcfree
03/15/2019, 2:12 PMcfree
03/15/2019, 2:12 PMreturn ctx.db.query.users(
{
where: {
AND: [
{ accountStatus: 'ACTIVE' },
{ accountType_in: args.accountTypes },
{ office: null },
],
},
},
info,
);