async-graphql: Incorrect variable substitution

This mutation fails—but works with other graphql libraries (Rust and NodeJs):

mutation($data: Base64Encoded!) {
  createCalls(
    calls: [
      {
        identifier: "test_call_identifier"
        timestamp: "2020-05-31T01:53:15+00:00"
        asset: { data: $data, requiresSpeechRecognition: true }
      }
    ]
  ) {
    id
    identifier
    timestamp
  }
}

variables:

{ "data": "asdf" }

But if I supply the complete variables/what the mutation expects, it works:

mutation($calls: [CreateCallInput!]!) {
  createCalls(calls: $calls) {
    id
  }
}
{
  "calls": [
    {
      "identifier": "test_call_identifier",
      "timestamp": "2020-05-31T01:53:15+00:00",
      "asset": {
        "data": "asdf",
        "requiresSpeechRecognition": true
      }
    }
  ]
}


Am I missing something?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Tell me if you have any questions. 😁

Please upgrade to 1.14.8.