Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested inputs fail parsing #17

Open
jim-hill-r opened this issue Jul 7, 2020 · 3 comments
Open

Nested inputs fail parsing #17

jim-hill-r opened this issue Jul 7, 2020 · 3 comments
Labels

Comments

@jim-hill-r
Copy link
Contributor

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:

  1. 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
}
  1. 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
    )
)
  1. Run following query
mutation { failingFunction(input:{nestedThing:{aThing:"test",bThing:"test"},otherThing:"test"}) }
  1. Error should occur:
Error: ErrorException("type Object_ has no field value")

Expected behavior
The args should arrive to the resolver as nested Dicts.

@jim-hill-r jim-hill-r added the bug label Jul 7, 2020
@neomatrixcode
Copy link
Owner

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.

@jim-hill-r
Copy link
Contributor Author

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.

@neomatrixcode
Copy link
Owner

Excellent thank you very much. I will contact you when the beta phase starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants