Using `OR` inside of `where` doesn't seem to be wo...
# orm-help
e
Using
OR
inside of
where
doesn't seem to be working. I keep getting back
Copy code
Error: Variable '$where' expected value of type 'UserWhereInput' but got: {"OR":[]}. Reason: 'OR' Field 'OR' is not defined in the input type 'UserWhereInput'. (line 1, column 8):
query ($where: UserWhereInput) {
typeDefs:
Copy code
type Query {
  users(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, first: Int ): [User!]!
  user(id: ID!): User
}
Resolver:
Copy code
users: (_, { where }, ctx, info) => {
    return ctx.prisma.users({ where }, info);
  }
Query in Playground:
Copy code
{
  users(
    where: {
      OR: [{ username_contains: "ross" }, { firstName_contains: "rick" }]
    }
  ) {
    id
    username
  }
}
u
are you using the mongodb connector? That might be why
e
Yes I am. Does it work differently or hasnt been implemented yet?
that feature is disabled at the moment
unfortunately
e
Ah 😞 I guess i can work around it. Thanks for saving me hours more of searching around!
u
no worries 🤘 community power
💪 1