Can anyone offer any help on the necessary syntax of persisted queries with arguments?
I have things working fine for a “queryType” query, now I’d like to progress to a “getType” query, which will need an argument, so I thought I could just extend the approach by adding variable section.
I’m having trouble though …
Using Insomnia I tried:
{
"query": "{{ _.query }}",
"variables":{"userId":"nigel"},
"extensions": {
"persistedQuery": {
"sha256Hash": "{% hash 'sha256', 'hex', _.query %}"
}
}
}
with _.query defined as
{
"query": "query MyQuery($userId: String!) {getUser(userId: $userId) {userId userCredentials {userEmail}}}"
}
gets me
{
"data": null,
"errors": [
{
"message": "Operations not allowed -- [getUser]"
}
]
}
Rujuning on Dgraph Cloud … so v20.11 (for a few more days anyway)