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
Filters of @authorization
directive are not taken into account for top-level aggregate queries
#4840
Comments
Many thanks for raising this bug report @andreloeffelmann. 🐛 We will now attempt to reproduce the bug based on the steps you have provided. Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:
If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket. Thanks again! 🙏 |
Hi @andreloeffelmann, please use the type Product
@authorization(
filter: [
{
requireAuthentication: false
operations: [AGGREGATE]
where: { AND: [{ node: { isPublic: true } }] }
}
]
) {
name: String
isPublic: Boolean!
} Edit: Also worth noting type Product
@authorization(
filter: [
{
requireAuthentication: false
operations: [READ, AGGREGATE]
where: { AND: [{ node: { isPublic: true } }] }
}
]
) {
name: String
isPublic: Boolean!
} |
Hi @mjfwebb, thanks for the quick reply! |
Oh, I'm sorry about that! I'll ensure the documentation is updated ASAP. As you say, it is missing. The options available for the Authentication directive
Authorization directivefilter:
validate:
|
Oh wow, that's a lot more supported functionality than I was aware of :) |
Describe the bug
When invoking a top-level aggregate query the
@authorization
filter directive is not taken into account.Instead, the count of all existing data is returned.
Type definitions
To Reproduce
Steps to reproduce the behavior:
2
instead of1
is returned.Expected behavior
It seems that the filter of the
@authorization
directive is not taken into account for the aggregate query. The query should return a count value of1
instead of2
.System (please complete the following information):
The text was updated successfully, but these errors were encountered: