Skip to content

Apollo Client query deduplication incorrectly deduplicates similar GraphQL operations with different files in variables #351

@jerbob92

Description

@jerbob92

When executing the same mutation with the same variables but with a different file in parallel, Apollo thinks that the request is the same, and will just wait for the first one to complete and returns that a response for all of them.

I have found out that setting queryDeduplication to false in Apollo (default is true), will fix this behavior. The reason for this is because with apollo-upload-client, the variables that go into Apollo are indeed exactly the same, so it thinks they are the same.

Is there anything that can be done about this? Perhaps adding a random dummy string (or a file hash) in place where the file will be mapped?

If not, it might be good to add information about this in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions