Stylianos Gakis11/16/2023, 1:04 PM
And I realize now that the cache also respects the input to
chat(until: Instant): Chat!
, 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.
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
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
Will do this for now at least I think, but it certainly feels like a bit of a hack 😳
val mergedMessages: Set<ChatMessagesQuery.Data.Chat.Message> = (data.chat.messages + message).toSet()