Skip to content

Conversation

daniel-stoneuk
Copy link
Collaborator

Store a single instance of apolloClient in the application class and retrieve by casting the Application to our GuideApp class. This adds extra complexity and is not how I would personally maintain a singleton object, therefore, I don't think this should be used as a guide since there are other ways to do this.

See: https://github.com/apollographql/apollo-android/blob/master/samples/kotlin-sample/src/main/java/com/apollographql/apollo/kotlinsample/repositories/MainActivity.kt

@lorensr
Copy link
Member

lorensr commented Aug 3, 2020

Got it. Could you do another PR with the simpler singleton code you'd use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants