From 5f5a411b6e80816fd59f7ee1f306a20eedaef66e Mon Sep 17 00:00:00 2001 From: Konstantin Babushkin Date: Sun, 10 Dec 2023 19:34:14 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Benedikt Franke --- docs/master/security/authorization.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/master/security/authorization.md b/docs/master/security/authorization.md index 5ddc1cca0..586c137ba 100644 --- a/docs/master/security/authorization.md +++ b/docs/master/security/authorization.md @@ -89,12 +89,12 @@ final class PostPolicy ### Protect mutations using database queries You can also protect specific models by using the [@canFind](../api-reference/directives.md#canfind) -or [@canQuery](../api-reference/directives.md#canquery) directive. They will query the database and check -policy against the result. +or [@canQuery](../api-reference/directives.md#canquery) directive. +They will query the database and check the specified policy against the result. ```graphql type Mutation { - editPost(input: PostInput): Post @canFind(ability: "edit", find:"input.id") + editPost(input: PostInput): Post @canFind(ability: "edit", find: "input.id") } input PostInput { @@ -147,7 +147,7 @@ This example shows how to restrict reading the `email` field to only the user it ```graphql type Query { - user(id: ID! @eq): User @find + user(id: ID! @whereKey: User @find } type User {