Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Benedikt Franke <[email protected]>
  • Loading branch information
k0ka and spawnia authored Dec 10, 2023
1 parent 3982815 commit 5f5a411
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/master/security/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5f5a411

Please sign in to comment.