Skip to content

Commit

Permalink
Fix regression in authenticatedItem query (#8278)
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Rybczynski <marek.rybczyn@gmail.com>
  • Loading branch information
marekryb and Marek Rybczynski committed Jan 30, 2023
1 parent 5a9ca53 commit 48ff6f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/twenty-parrots-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-6/auth': patch
---

Fix regression in authenticatedItem query
2 changes: 1 addition & 1 deletion packages/auth/src/gql/getBaseAuthSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function getBaseAuthSchema<I extends string, S extends string>({
}),
resolve(root, args, { session, db }) {
if (
(typeof session?.itemId === 'string' || typeof session.itemId === 'number') &&
(typeof session?.itemId === 'string' || typeof session?.itemId === 'number') &&
typeof session.listKey === 'string'
) {
return db[session.listKey].findOne({ where: { id: session.itemId } });
Expand Down

1 comment on commit 48ff6f1

@vercel
Copy link

@vercel vercel bot commented on 48ff6f1 Jan 30, 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.