Skip to content

Issue when passing nested structure #1556

@mstodulski

Description

@mstodulski

Hi,
I've been using your library for a while and it's working great, but I hit a problem. When attempting to execute query with passing args to create an object that contains another object, which contains a collection of another objects, I receive a weird error message:

Field "arrayOfComplexObjectsLevel3" is not defined by type "complexObjectLevel2". Did you mean "arrayOfComplexObjectsLevel3"?

Problem can be reproduced using the code of service placed here:

https://github.com/mstodulski/graphql-example

and quering the service using curl from the command line:

curl http://localhost -H 'content-type: application/json' -d '{"query": "mutation { addComplexObject( name: \"Example complex object name\", complexObjectLevel2: { arrayOfComplexObjectsLevel3: [ { nameLevel3: \"Example level 3 name 1\" }, { nameLevel3: \"Example level 3 name 2\" }, { nameLevel3: \"Example level 3 name 3\" } ] } ) { name } }"}'

Could you help me with this? It seems to me this structure should be accepted according to the GraphQL standard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions