Is the normalized cache supported when using Kotli...
# apollo-kotlin
j
Is the normalized cache supported when using Kotlin/JS?
👌 1
b
I’m afraid not! Here’s the matrix of Multiplatform.
j
ok, thanks
I was looking to use in https://github.com/joreilly/PeopleInSpace which has Kotlin/JS client.....but can factor out use of normalized cache for that platform (have done something similar for another library)
👍 1
b
we have this issue open for this - we think it may not be too hard (but that’s often a dangerous statement 😅) since SQLDelight supports JS
j
actually, that matrix shows that
apollo-normalized-cache
is available for JS?
this is the in memory one I presume?
b
woops sorry yes, that’s correct
j
cool, can configure hopefully to use just that then for JS
👍 1
Getting following for some reason when building Kotlin/JS (after adding apollo dependencies)....I'll keep digging but just in case it's something you've come across....
Copy code
java.lang.IllegalStateException: FATAL ERROR: Could not find "io.ktor:ktor-http-cio" in [/Users/joreilly/Library/Application Support/kotlin/daemon]
	at org.jetbrains.kotlin.ir.backend.js.KlibKt$toResolverLogger$1.fatal(klib.kt:117)
	at org.jetbrains.kotlin.library.KotlinLibrarySearchPathResolver.resolve(SearchPathResolver.kt:175)
This is code that still has ktor dependencies....perhaps running in to some conflicts between versions used
probably an usual situation to have a project use both apollo and ktor directly.....had thought I'd show both implementation side by side for comparison but might just create separate branch that use apollo
b
👋 Hey did you manage to resolve it in the end?
j
I ended up keeping this in separate branch without ktor stuff for now. I'm using Ktor 2.x atm in that project which I think is probably incomaptible.
b
oh indeed that must be it - Apollo is using 1.6.4
j
I had to move to 2.x in that project to get combination of dependencies that worked on M1 devices and also supported new k/n memory model
b
Yeah I can imagine. It would be nice for Apollo to depend on the more recent one too - wondering if that would be a big change (I'm supposing not too big). On the other hand this could break people who want to do this too but are still on Ktor 1.x 😄
j
2.0 is still in beta right now.....I guess maybe more a potential requirement once it hits stable
1
have you guys been looking much yet at using new memory model?
b
Good point!
Re: memory model, we haven't looked at it too much, but it's on the roadmap. But yeah I guess waiting for things to be more stable overall 🙂
c
Is it still the case that 2.x would be needed to use the new k/n memory model?
b
Not sure about Ktor but Apollo still doesn’t support the new memory model at this point
👍 1