Apollo-android: Multiple schemas in same project - Apollo Android

Created on 30 Jul 2020  路  3Comments  路  Source: apollographql/apollo-android

Can anyone tell me how to use 2 different schemas in one project with 2 different URLs on Android?

Question

All 3 comments

You can use the service method in your Gradle configuration:

apollo {
  service("github") {
    sourceFolder.set("com/github")
    rootPackageName.set("com.github")
  }

  service("fullstack") {
    sourceFolder.set("com/apollographql/fullstack")
    rootPackageName.set("com.apollographql.fullstack")
  }
}

(from https://github.com/martinbonnin/apollo-android-samples/tree/master/multiple-services)

@pratthama-appdesk let us know if you need more information, else I'll close this issue.

@pratthama-appdesk let us know if you need more information, else I'll close this issue.

Hi, thanks for information.
I wrote an article on medium on getting started with graphql in android with kotlin using coroutines
https://medium.com/@arora.prattham/graphql-in-android-using-kotlin-with-coroutines-2b00a462e765

P.S you can close the issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings