Open rynoV opened 1 year ago
I'm seeing a similar issue using a complex input type. If I have something like
type Mutation {
createFoo(input: FooInput!): Foo!
}
type FooInput {
bar: String!
baz: String
}
and I run
{"query": "mutation { createFoo(input: $input) }", "variables": {"input": {"bar": "?"}}}
I get
{"errors":[{"message":"field 'baz' was not found on type 'FooInput'"}]}
So I guess the query parser just doesn't handle optional arguments, even though the schema parser and type/term system both do (expressing them with Maybe
)? I'm trying to work on a fix myself but not finding the query parser code easy to understand...
With
mu-graphql-0.5.0.3
, if I have:and I try a mutation like:
I don't see a way to avoid setting
$newState
to a string. In the JSON request if I use:I get a graphql error:
If I instead do:
I get:
Is this a bug or am I missing something? For my case, preferably
"variables":{}
would work since that's what my graphql client lib does.