menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Studio
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team

Invalidating a cached query based on it's members

July 23, 2020 at 4:49pm

Invalidating a cached query based on it's members

July 23, 2020 at 4:49pm
I'm trying to figure out if it's possible to create a Link that will keep a record of the objects that result from a query and refetch that query if those objects are invalidated somehow?
For example, the age old graphql problem of filtered lists of items. If that list query could be refetched if any object in the list changed then the item that should no longer be present would be removed.
Another example, let's say I have a list of items that are currently waiting on some response from backoffice staff. When that response is ready I could notify the client that an object has changed and every query in the client that cares about that object would refetch.
This seems like something that should be possible with Apollo Links since they are based on Observables, is this correct?
No messages yet