Describe the bug
Referencing the same field multiple times within the same object should merge all the referenced subfields inside that field together, but currently this doesn't happen - instead, the last reference to a field overwrites all previous ones.
To Reproduce
This query reproduces the issue:
query fieldMerging($id: ID!) {
person(id: $id) {
id
firstName
lastName
address {
country
}
address {
city
state
}
}
}
Expected behavior
The resulting OpenAPI schema should include country, city, and state in the address property of person, but it only includes city and state.
Desktop (please complete the following information):
- OS: macOS 14.7
- Node v20.18.0
Additional context
I've also tested this using fragment spreads, and they have the same incorrect behavior.
Describe the bug
Referencing the same field multiple times within the same object should merge all the referenced subfields inside that field together, but currently this doesn't happen - instead, the last reference to a field overwrites all previous ones.
To Reproduce
This query reproduces the issue:
Expected behavior
The resulting OpenAPI schema should include
country,city, andstatein theaddressproperty ofperson, but it only includescityandstate.Desktop (please complete the following information):
Additional context
I've also tested this using fragment spreads, and they have the same incorrect behavior.