Ghassen Ghabarou
08/20/2019, 7:49 PMasync function feed(parent, args, context, info) {
const where = args.filter ? {
OR: [
{ description_contains: args.filter },
{ url_contains: args.filter },
],
} : {}
const links = await context.prisma.links({
where
})
return links
}
So I checked the generated prisma.schema.js and indeed it wasn't defined in LinkWhereInput
I don't know if this has happened to other people or if there's actually a problem with my setup.siddhant
08/20/2019, 9:23 PMargs.filter is falsy though. Could you log out the args before returning the links and see what you get?Ghassen Ghabarou
08/21/2019, 4:21 PMVariable '$where' expected value of type 'LinkWhereInput' but got: {\"OR\":[{\"description_contains\":\"in\"},{\"url_contains\":\"in\"}]}. Reason: 'OR' Field 'OR' is not defined in the input type 'LinkWhereInput'. (line 1, column 8):\nquery ($where: LinkWhereInput) {\n ^