-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added async capability for all Access Control resolvers (#2872)
* Added async capability for all Access Control resolvers * change all instances to micro-memoize * fix linter * fix prettier * fix tests * run format * updated changeset messaging to better reflect major breaking changes * Update .changeset/nine-crews-flow.md Co-authored-by: Caleb Gray <caleb.gray@augustineinstitute.org> Co-authored-by: Jess Telford <jess+github@jes.st>
- Loading branch information
1 parent
c234ad4
commit 839666e
Showing
13 changed files
with
222 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
'@keystonejs/access-control': major | ||
'@keystonejs/keystone': major | ||
'@keystonejs/logger': patch | ||
--- | ||
|
||
Added async capability for all Access Control resolvers. This changes the below methods to async functions, returning Promises: | ||
|
||
``` | ||
access-control | ||
- validateCustomAccessControl | ||
- validateListAccessControl | ||
- validateFieldAccessControl | ||
- validateAuthAccessControl | ||
keystone/List | ||
- checkFieldAccess | ||
- checkListAccess | ||
keystone/providers/custom | ||
- computeAccess | ||
keystone/providers/listAuth | ||
- checkAccess | ||
``` | ||
|
||
Changed `keystone/Keystone`'s `getGraphQlContext` return object (context) to include async resolvers for the following methods: | ||
``` | ||
- context.getCustomAccessControlForUser | ||
- context.getListAccessControlForUser | ||
- context.getFieldAccessControlForUser | ||
- context.getAuthAccessControlForUser | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.