api-platform / api-platform/core

[GraphQL] Use same type for mutations and queries if normalization context is equal

Aberta
#4,102 2 comentários 0 reações 0 responsáveis Ver no GitHub
GraphQL
Linguagem predominante
PHP
Estrelas
2.6k
Forks
980
Merge médio
2d 5h
PRs com merge (30d)
48

Descrição

**Description**

[https://api-platform.com/docs/core/graphql/#different-types-when-using-different-serialization-groups](https://api-platform.com/docs/core/graphql/#different-types-when-using-different-serialization-groups)

In your documentation it states that if the normalization context is the same, then the generated type will be equal. However, looking at the TypeBuilder's code this appears to only be the case for collection_query and item_query. It would be nice if this was also the case for mutations and even custom mutations, because otherwise certain features of popular clients like Apollo don't work as expected (e.g. caching).

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.