I am receiving this error:
{
"message": "mutation deleteFilter failed because Dgraph execution failed because line 4 column 4: Only aggregation/math functions allowed inside empty blocks. Got: filter.option",
"locations": [
{
"line": 2,
"column": 5
}
]
}
From this query:
mutation DELETE_QUICK_ACCESS_FILTER($id: ID!) {
deleteFilter(filter: {id: [$id]}) {
numUids
}
}
given this variables object:
{
"id":"0x22ad48"
}
Not providing a JWT header, produces the error. If I provide the header with the JWT including the USERROLE:“ADMINISTRATOR” then the delete operation is successful.
Here is the pertinent schema:
type Filter
@auth(
query: { or: [
{ rule: "{$USERROLE: { eq: \"ADMINISTRATOR\"}}" }
{ rule: "query { queryFilter(filter: { isPublic: true }) { id } }" }
{ rule: "query ($USERNAME: String!) { queryFilter { access { grants { isUser(filter: { username: { eq: $USERNAME } }) { username } } } } }" }
{ rule: "query ($USERNAME: String!) { queryFilter { access { grants { isGroup { hasGrantedAccess { hasRights(filter: { isTrue: true and: { name: { eq: canViewFilters } or: { name: { eq: isAdmin } } } }) { id } user(filter: { username: { eq: $USERNAME } }) { username } } } } } } }" }
]}
add: { or: [
{ rule: "{$USERROLE: { eq: \"ADMINISTRATOR\"}}" }
{ rule: "{$USERROLE: { eq: \"USER\"}}" }
]}
update: { rule: "{$USERROLE: { eq: \"ADMINISTRATOR\"}}" }
delete: { rule: "{$USERROLE: { eq: \"ADMINISTRATOR\"}}" }
) {
id: ID!
name: String @search(by: [exact, term, fulltext, regexp])
isPublic: Boolean @search
access: [ACL] # not including this entire type, just showing it does exist
}