Skip to content

GraphQLQueryWatcher doesn't update its dependent keys #1365

@teodorpenkov

Description

@teodorpenkov

With the 0.23.0 release Apollo changed the way it stores keys in the QueryWatcher https://github.com/apollographql/apollo-ios/blob/main/Sources/Apollo/GraphQLQueryWatcher.swift#L73-L83

The problem with this is that the watcher doesn't update its dependentKeys like it should. There is a commit that does that but I couldn't follow why it was changed:
2b07e69

The problem that we are experiencing is that we are updating a query in the store with ReadWriteTransaction and in the previous versions the updated query captured the newly dependent keys, therefore when a change occured it was propagated to the result handler and now it's not.

What's the reason behind this change and how can we workaround this? Was there a problem with the previous implementation in 0.22.0 https://github.com/apollographql/apollo-ios/blob/0.22.0/Sources/Apollo/GraphQLQueryWatcher.swift#L66-L68

Metadata

Metadata

Assignees

No one assigned

    Labels

    cachingquestionIssues that have a question which should be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions