Describe the bug
When using the prisma.$exists method, prisma-client-lib throws an error.
To Reproduce
Steps to reproduce the behavior:
$exists, for example Query.ts:export const Query: IQuery.Resolver<Types> = {
masters: async (root, args, ctx) => {
const exists = await ctx.db.$exists.master({ id: "test" });
console.log(exists);
return ctx.db.masters();
}
};
masters query.Error: Invalid exist query: masters
at Object.buildExistsInfo (/Users/.../prisma-examples/typescript-graphql/node_modules/prisma-client-lib/src/info.ts:289:11)
Expected behavior
To console log a boolean and continue within the resolver.
Versions (please complete the following information):
prisma/1.17.0-beta.2 (darwin-x64) node-v8.11.41.17-beta-1Fixed via https://github.com/prisma/prisma/commit/cd53fc8eba010df60c56f3b5c9131ed12392e3ed
I can confirm that I am no longer able to reproduce. This is available in the latest beta npm install -g prisma@beta.
This is now in stable (1.17). Please use npm install -g prisma to update the CLI.