Skip to content

Commit

Permalink
fix issue with incompatible where clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Aug 29, 2023
1 parent 7ef797b commit 8c61be7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions packages/plugin-prisma/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ type QueryFromRelation<
? {
include?: NonNullable<I>;
select?: NonNullable<S>;
where?: {};
}
: never
: never;
Expand Down Expand Up @@ -606,7 +605,6 @@ export type PrismaFieldResolver<
query: {
include?: Model['Include'];
select?: Model['Select'];
where?: {};
},
parent: Parent,
args: InputShapeFromFields<Args>,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-prisma/tests/example/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const User = builder.prismaNode('User', {
resolve: (query, user) =>
prisma.post.findMany({
...query,
where: { ...query.where, authorId: user.id },
where: { ...(query as { where?: {} }).where, authorId: user.id },
}),
}),
postsConnection: t.relatedConnection(
Expand Down

1 comment on commit 8c61be7

@vercel
Copy link

@vercel vercel bot commented on 8c61be7 Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.