Stylianos Gakis
11/16/2023, 1:04 PMchat(until: Instant): Chat!
And I realize now that the cache also respects the input to until
, and caches the responses here separately.
This means that my original plan to watch the query with any input doesn’t look like it’s working atm 😄
Is there a way to alter this, perhaps manually? The cache in our case does not depend on that input at all, they should be shared for any input for this one query.Stylianos Gakis
11/16/2023, 4:18 PMpopulateCacheWithNewMessages
from here which now takes a list, and puts it in the cache for the query with a null input, manually after the response is successfully back.
So manually populating the cache for the null
input version of the query, which is the one which I am watching seems to work fine 😊
As long as I make sure to filter the duplicates by doing this however val mergedMessages: Set<ChatMessagesQuery.Data.Chat.Message> = (data.chat.messages + message).toSet()
Will do this for now at least I think, but it certainly feels like a bit of a hack 😳