Skip to content

Multiple selection sets for the same object should be merged on top-level #404

@stuebingerb

Description

@stuebingerb

With a simple schema that returns a Person(val firstName: String, val lastName: String), the following query produces incorrect results:

{
    me {
        firstName
    }
    me {
        lastName
    }
}

Expected:

{"data":{"me":{"firstName":"John","lastName":"Doe"}}}

Actual:

{"data":{"me":{"lastName":"Doe"}}}

See https://spec.graphql.org/October2021/#example-77852


For nested fields (e.g. a PersonWrapper(val person: Person)) this already works as expected:

{
    me {
        person {
            firstName
        }
        person {
            lastName
        }
    }
}

Results in

{"data":{"me":{"person":{"firstName":"John","lastName":"Doe"}}}}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions