Does Apollo for multiplatform generate your querie...
# apollo-kotlin
s
Does Apollo for multiplatform generate your queries for you? reading here:Β https://www.apollographql.com/docs/android/essentials/get-started-multiplatform/
🧡 1
schema.graphqls
was downloaded correctly via gradle task
is there something else i need to do ? Don't see models generated in that folder
e
it only generates the models necessary for the queries that you write, not everything in the schema
☝️ 1
πŸ‘ 1
s
are the queries validated / type safe based on the downloaded schema?
πŸ‘Œ 1
ty
for reference:
Copy code
val commonMain by getting {
            dependencies {
                implementation("com.apollographql.apollo:apollo-runtime-kotlin:2.5.9")
                implementation("com.apollographql.apollo3:apollo-api:3.0.0-alpha07")
            }
        }
not too sure if theres an incompatibility there?
e
Apollo-Android 2 and 3 can coexist, but they don't work with each other either
πŸ‘ 1
βž• 1
s
What is the proper apollo runtime for multiplatform model generation? Currently going off https://www.apollographql.com/docs/android/essentials/get-started-multiplatform/#add-the-runtime-dependencies
e
it's promoted to com.apollographql.apollo3:apollo-runtime, version should match everything else. docs were updated: https://github.com/apollographql/apollo-android/pull/3175/files#diff-26ac530f2631bce2200edc7db35b4e8cf014f9d1a91805d216b88e36c8db8594 dunno why that isn't reflected on the site though
πŸ”₯ 1
πŸ‘€ 1
πŸ™ 1
πŸ™ 1
βž• 1
s
Okay yeah that was definitely the source of my confusion πŸ˜…
even the other samples on the site are outdated e.g.
Copy code
ApolloHttpNetworkTransport
no longer exists
m
The site mainly mentions the stable 2.x version. Doc for 3.x is still ongoing and will be promoted to stable by the end of the year
πŸ‘ 1
For multiplatform, I definitely recommend 3.x though. It's alpha but given that multiplatform itself is alpha it should be ok. And 3.x has a lot of things for multiplatform
πŸ‘ 1
The early version of the 3.x docs are at https://www.apollographql.com/docs/android/v3/
s
Thanks for clarifying @mbonnin much appreciated!