graphql
graphql copied to clipboard
null values in input are missing in ResolveParams.Args
When I request a mutation to my graphql server(using graphql-go) with null values in input arguments, the null values are missing in ResolveParams.Args
mutation Update($id: Int!, $input: UpdateInput!) {
update(id=$id, input=$input)
}
with variable...
{
id: 123,
input: {
title: "TITLE"
description: null
}
}
Property 'description' does not come into mutation resolver function
// Resolver for mutation update
func ResolveUpdate(p graphql.ResolveParams) (any, error) {
fmt.Println("*** Args:", p.Args)
// -> *** Args: map[id:123 input:map[title:TITLE]]
}
I want to distinguish 'description' property between value as null case and missing case
PS. When I write graphql server with graphql-js (javascript version of graphql library), null values comes into the resolver implementation function normally.