-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[GraphQL] Security #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GraphQL] Security #471
Conversation
core/graphql.md
Outdated
If your security needs differ between REST and GraphQL, add the particular parts in the `graphql` key. | ||
|
||
In the example below, we want the same security rules as in REST, but we also want to allow an admin to delete a book in GraphQL only. | ||
Please note it's not possible to update a book in GraphQL because the operation is not defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that ... because the operation update
is not enabled defined.
core/graphql.md
Outdated
@@ -59,7 +60,10 @@ use ApiPlatform\Core\Annotation\ApiResource; | |||
* graphql={ | |||
* "query"={ | |||
* "filters"={"offer.date_filter"} | |||
* } | |||
* }, | |||
* "delete"={}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax "delete", "update", "create"
should work IIRC.
core/graphql.md
Outdated
@@ -68,3 +72,42 @@ class Offer | |||
// ... | |||
} | |||
``` | |||
|
|||
## Security (access_control) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`access_control`
a27b1b5
to
61f4461
Compare
Fixed. |
thanks @alanpoulain |
No description provided.