Passing variable to single value in complex input type ends up sending null value
See original GitHub issueDescribe the bug Passing variable to single value in complex input type ends up sending null value
To Reproduce Steps to reproduce the behavior:
- Setup a mutation with
String!
and second with complex input type. - Send the following variables
{
"id":"123",
"name":"does not populate"
}
- The following query works as expected
mutation updateProject($id: String!) {
projects {
update(id: $id, project: { name: "works"}) {
id
}
}
}
- 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:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
also we have a slack channel for support …
https://join.slack.com/t/hotchocolategraphql/shared_invite/enQtNTA4NjA0ODYwOTQ0LTViMzA2MTM4OWYwYjIxYzViYmM0YmZhYjdiNzBjOTg2ZmU1YmMwNDZiYjUyZWZlMzNiMTk1OWUxNWZhMzQwY2Q