Skip to content

nested inputObjectType with same property names #206

Closed
@u9520107

Description

@u9520107

I am not sure if this is a bug or I am missing some reading.
Suppose my mutation takes in an argument person, of type Person.
Person has a field named id, and a field tools which is a list of type Tool.
Tool also has a field named id.

The problem is, when I indeed serialize the argument object into graphql.

mutation M {
  test: testMutation (
    person: {
      id: 'test-id',
      tools: [{
        id: 'test-tool-id'
      }]
    }
  ) {
    result
  }
}

The query results in an error saying that there can only be one input field named "id".

Is the format I am using wrong?

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