Stylianos Gakis
06/25/2024, 2:23 PMPagingSource
automatically for you. Has someone ever tried to do the same for the GQL cache?
Optimally if someone else has already done something similar I could take a look to see if I can use it, otherwise I am just getting into it to see how it might even work.
p.s. Never used androidx.paging before, so I am very much in uncharted land right now π
Please tell me if what I am saying is a bad idea for some reason.Stylianos Gakis
06/25/2024, 2:27 PMbod
06/25/2024, 2:29 PMStylianos Gakis
06/25/2024, 2:38 PMtype Conversation {
messagePage(olderToken: String, newerToken: String): ChatMessagePage!
}
type ChatMessagePage {
messages: [ChatMessage!]!
olderToken: String
newerToken: String
}
Now trying to understand if this would still be applicable here πStylianos Gakis
06/25/2024, 2:39 PMbod
06/25/2024, 2:40 PMbod
06/25/2024, 2:41 PMStylianos Gakis
06/25/2024, 2:43 PMStylianos Gakis
06/25/2024, 2:45 PMbod
06/25/2024, 2:54 PMStylianos Gakis
06/25/2024, 2:57 PMStylianos Gakis
06/28/2024, 2:09 PM.doNotStore(true)
.fetchPolicy(FetchPolicy.NetworkOnly)
So as not to use the cache at all for this since it'd be wasted and I got my POC working just fine.
My RemoteMediator now is responsible for calling the GQL Endpoint and storing the things manually inside my Room DB where I also get full control over the type of data I store as opposed to what specifically our backend is returning.
Works fine, I am not utilizing the entire power of apollo-kotlin for this but this is fine, it did give me the tools to get this working anyway, so I am happy π Thanks for the help, and again if I revisit this later I will definitely come back here πbod
06/28/2024, 2:10 PM