Last active
February 13, 2022 21:57
-
-
Save xperiandri/5e5963ac6ba514803623381b6a952937 to your computer and use it in GitHub Desktop.
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
let GrupoMutationsType = | |
Define.Object<GrupoArgs> | |
(name = "GrupoMutations", description = "Group mutations", | |
fields = | |
[ Define.PatchesField("patch", PatchCacheKey, | |
// Attach policy / Цепляем политику | |
GrupoPatchMutations).WithAuthorizationPolicies<GrupoPatchViewModel> (Policies.GroupAdmin) | |
(Define.AsyncUnitResultField | |
("addAdmin", "Add group admin (any admin can do)", | |
[ Define.Input(Command, AddAdminCommandInputType) ], | |
// Attach policy / Цепляем политику | |
asyncAddGrupoAdmin)).WithAuthorizationPolicies<Unit> (Policies.GroupAdmin) | |
(Define.AsyncUnitResultField | |
("removeAdmin", "Remove group admin (only group owner can do)", | |
[ Define.Input(Command, RemoveAdminCommandInputType) ], | |
// Attach policy / Цепляем политику | |
asyncRemoveGrupoAdmin)).WithAuthorizationPolicies<Unit> (Policies.GroupOwner) ]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment