I have a query:
query AllUserNames{allUserNames}
defined as:
allUserNames: [String!]! @resolver(name: "all_user_names")
in the schema.
Index is defined as:
{
name: "all_user_names",
unique: false,
serialized: true,
source: "User",
values: [
{
field: ["data", "username"]
}
]
}
Resolver is defined as:
{
name: "all_user_names",
role: Role("all_user_names"),
body: Query(
Lambda(
[],
Select(
"data",
Map(
Paginate(Match(Index("all_user_names"))),
Lambda("x", Get(Var("x")))
)
)
)
)
}
Role is defined as:
{
ref: Role("all_user_names"),
ts: 1598854142753000,
name: "all_user_names",
privileges: [
{
resource: Collection("User"),
actions: {
read: true,
write: false,
create: false,
delete: false,
history_read: false,
history_write: false,
unrestricted_read: false
}
},
{
resource: Index("all_user_names"),
actions: {
unrestricted_read: false,
read: true
}
}
],
membership: []
}
The http header uses a valid token (that validates similarly configured queries).
The query (allUserNames) gives error:
{
"errors": [
{
"message": "Insufficient privileges to perform the action.",
"extensions": {
"code": "permission denied"
}
}
]
}
What have I incorrectly configured to prevent this query from having access permission? thanks âŚ