Discussed in #2785
Originally posted by ascii1010 July 24, 2025
brochure: books(
filter: { type: { eq: "brochure" } }
) {
items {
id
description
}
}
magazine: books(
filter: { type: { eq: "magazine" } }
) {
items {
id
description
}
}
The above generates error:
An item with the same key has already been added. Key: books
Theory
The issue is not GraphQL itself. It is the resolver implementation using the entity name as the dictionary key instead of the alias or a unique field identifier. Two selections of books are valid GraphQL, but the server code is deduplicating by entity name and therefore treating them as a duplicate dictionary key.