Diana.jl
Diana.jl copied to clipboard
Nested inputs fail parsing
Describe the bug When using nested Input types, the parser fails with the following error: Error: ErrorException("type Object_ has no field value")
To Reproduce Steps to reproduce the behavior:
- Set up schema as such:
input NestedInput {
aThing: String
bThing: String
}
input BaseInput {
nestedThing: NestedInput
otherThing: String
}
type Query {
hello: String
}
type Mutation {
failingFunction(input: BaseInput ): String
}
schema {
query: Query
mutation: Mutation
}
- Set up resolvers as such:
Dict(
"Query" => Dict(
"hello" => (root, args, ctx, info) -> (return "world")
),
"Mutation" => Dict(
"failingFunction" => (root, args, ctx, info) -> begin
println(args)
# ARGs will not properly parse and drop into this function
end
)
)
- Run following query
mutation { failingFunction(input:{nestedThing:{aThing:"test",bThing:"test"},otherThing:"test"}) }
- Error should occur:
Error: ErrorException("type Object_ has no field value")
Expected behavior The args should arrive to the resolver as nested Dicts.
Thanks for your issue, you are right the nested input types are not working properly, we are preparing to launch a new version (0.3) in which we will rebuild the entire package from the kernel. So we hope to be able to solve this problem in the next version.
Awesome to hear! If you need some beta testers, let me know. I would love to transition my Apollo workloads over to Julia native workloads.
Excellent thank you very much. I will contact you when the beta phase starts.