Skip to content

Commit

Permalink
fix listKey argument type
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Sep 10, 2023
1 parent 20efb1c commit 2fdf468
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fix-list-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-6/core': patch
---

Fixes `listKey` argument type for access control and hooks is now refined to the actual list key string in that context
2 changes: 1 addition & 1 deletion packages/core/src/types/config/access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { BaseListTypeInfo } from '../type-info';
export type BaseAccessArgs<ListTypeInfo extends BaseListTypeInfo> = {
context: KeystoneContext<ListTypeInfo['SchemaTypeInfo']>;
session?: ListTypeInfo['SchemaTypeInfo']['session'];
listKey: string;
listKey: ListTypeInfo['key'];
};

export type AccessOperation = 'create' | 'query' | 'update' | 'delete';
Expand Down

0 comments on commit 2fdf468

Please sign in to comment.