Replies: 1 comment
-
Cache:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have a query that retrieves a user profile and their photos. The photos may or may not be processed at that time, but the server emits a notification when that happens and the client subscribes to those events to know when a photo has been processed.
The userProfile result has photo objects nested deeply, but the normalization process takes care of that, and puts the photo: objects in the cache. The subscription handler can update them correctly.
In another (decoupled) part of the code (image component) I would like to either poll, or wait for one or multiple photos to be processed and to be presentable to the user. The input to the component is a photo id
How can I write a query/watchquery that would never reach the server, but would return the photo object in the cache?
I can't use
.readQuery
, because there is no "real" query for fetching photos directly.Basically I would need a
cache.watch("photo:<ID>")
that returns an ObservableBeta Was this translation helpful? Give feedback.
All reactions