Is there any good documentation on how to use filt...
# orm-help
g
Is there any good documentation on how to use filtering on Prisma? I’m trying to use the logical OR in the where filtering but I can’t manage to work. It seems the logical OR is not in my WhereInput type.
Copy code
"Argument 'where' expected type 'RoomWhereInput' but got: {OR: [{city_contains: \"Paris\"}, {state_contains: \"Paris\"}]}. Reason: 'OR' Field 'OR' is not defined in the input type 'RoomWhereInput'
k
The docs in GraphQL Playground should give a good overview of the available types and accepted parameters. Maybe that helps to double-check the
RoomWhereInput
?
g
Thanks Kuldar, the thing is that RoomWhereInput is being automatic generated by prisma and it is true that I checked and the OR is not there.
Not sure, how prisma works behind the scene to add the logical OR to the input type.
It is added on ‘input RoomScalarWhereInput’ but not in ‘input RoomWhereInput ’.
h
@Guilherme Which connector are you using? If you are using mongodb connector OR is currently not supported, see: https://github.com/prisma/prisma/issues/3897
g
@Harshit thanks a lot! I’ve been two days trying to figure this out. Im using Mongodb connector. This answer my question! 👍
😊 1