question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing variable to single value in complex input type ends up sending null value

See original GitHub issue

Describe the bug Passing variable to single value in complex input type ends up sending null value

To Reproduce Steps to reproduce the behavior:

  1. Setup a mutation with String! and second with complex input type.
  2. Send the following variables
{
  "id":"123",
  "name":"does not populate"
}
  1. The following query works as expected
mutation updateProject($id: String!) {
  projects {
    update(id: $id, project: { name: "works"}) {
      id
    }
  }
}
  1. The following example will populate the id as expected but populates a null name value
mutation updateProject1($id: String!, $name: String!) {
  projects {
    update(id: $id, project: { name: $name }) {
      id
    }
  }
}

Expected behavior

mutation updateProject1($id: String!, $name: String!) {
  projects {
    update(id: $id, project: { name: $name }) {
      id
    }
  }
}

Should populate the project.name with the $name variable (eg.“does not populate”)

Desktop :

  • OS: Windows10
  • Version 9.0.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelstaibcommented, Aug 5, 2019

The error filters can now also be injected so with the upcoming version they become a lot easier.

If you like our API please give us a star so that we get more visible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting null value for primitive-typed variable via TF_VAR_ ...
We encountered this issue as part of writing a tool which converts from multiple variable formats to just environment variables when supplying ...
Read more >
Pass complex data from form submit?
I have a array of objects that each have like 5 fields and I want to send that array on a form submit....
Read more >
Null values and the nullable type
timeValue(), can return null values, either because you pass them a null value, or because the information you request does not exist.
Read more >
Dynamically pass in values in Terraform - Input Variables
If nullable is false and the input variable is defined with a default value, Terraform will use the default value null .
Read more >
Input Variables - Configuration Language | Terraform
Passing a null value as a module input argument will override any default value. Setting nullable to false ensures that the variable value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found