-
-
Notifications
You must be signed in to change notification settings - Fork 643
Closed
Labels
📦 cacheRelates to caching functionalityRelates to caching functionalityPRs encouragedPRs are welcome if stakeholders want to take ownershipPRs are welcome if stakeholders want to take ownershipflutterIssue relates mainly to graphql_flutterIssue relates mainly to graphql_flutterreleasedreleased on @beta
Description
the default fetch policy for client.mutate is networkOnly, because it is usually the case that the fields requested correspond to mutated data, and thus are expected to be stale if fetched eagerly from the cache.
However, when a mutation is made with client.watchQuery (such as with the Mutation widget), the cacheAndNetwork policy is used by default, resulting in unexpectedly stale data when an optimisticResult is not provided.
Another serious issue is that the same mutation, with the same variables, might return different entities. If those results are used in parts of the application, the results of the latest usage will overwrite those of the older ones.
SanjiKir and rwrz
Metadata
Metadata
Assignees
Labels
📦 cacheRelates to caching functionalityRelates to caching functionalityPRs encouragedPRs are welcome if stakeholders want to take ownershipPRs are welcome if stakeholders want to take ownershipflutterIssue relates mainly to graphql_flutterIssue relates mainly to graphql_flutterreleasedreleased on @beta