I wanted to give a shot to checking the apollo nor...
# apollo-kotlin
s
I wanted to give a shot to checking the apollo normalized cache through the new IDE plugin. As I open it, I am asked to look for a .db file in my device, which it does not seem to find when I click on it. Is it that I would need to use the SQL backed cache for this to work? Right now we’re only using the in-memory one, aka
MemoryCacheFactory(maxSizeBytes = 10 * 1024 * 1024)
for example. Didn’t find something regarding that here or here, maybe I am missing something? 😊
m
You'll need v4 and
ApolloDebugServer
to be able to read the memory cache from the IDEA plugin
2
b
if you were using the persisted cache the plugin could have read it by giving it the db file. But for the in-memory one it's more involved, it needs to communicate with your app.
s
Hmm so even for 3.x, if I for now do
Copy code
.normalizedCache(
  SqlNormalizedCacheFactory(get<Context>(), "debug-apollo.db"),
)
in my ApolloClient (and remove the in-memory one for now, or I could also use
chain
I suppose), I should then be able to use the plugin to watch the normalized cache right? I am doing this right now without much luck, will give it some more tries though, tried restarting the app, the IDE, reinstalling the App from scratch etc. Anything obvious that I could be missing?
And by not much luck I mean this of course
b
The plugin tries to find the file via adb commands - for it to work your app must be debbugable, I guess it's the case? Otherwise, you can pull the file yourself (either command line
adb pull
or using AS's device explorer) and then epen it
s
Hmm yeah it should be debuggable, but I can triple check this. If I do the adb pull myself, it will mean that I will need to re-fetch that each time, or is there a button to auto-do this if it already knows the path to the right place?
b
also would you like to try the Snapshot version of the plugin?
👍 1
it will mean that I will need to re-fetch that each time
unfortunately yes
(I could totally make the refresh button reload the file though! Good idea - logged here)
🌟 1
s
Giving
4.0.0-beta.3-SNAPSHOT.41
a shot now
🙏 1
Voilà
b
hurray! 😄
s
And got a follow-up question because of what I learned from this 😅 Will post it on the main channel. But how cool is that, the plugin is turning out to be a great addition to our workflow, you’re doing a killer job there, great job! And with every question I make here the more you folks are convincing me that I must migrate to 4.x sooner rather than later 😂
b
aww thank you very much that's great to hear! 🙏