Skip to content

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

Open
@javajan

Description

@javajan

Description

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions