https://kotlinlang.org logo
#apollo-kotlin
Title
# apollo-kotlin
c

Colton Idle

02/10/2023, 3:09 PM
Is a query stateful in any way? My example. I have a class called GetBooksService which takes in a Singleton ApolloClient (provided by dagger). GetBooksService is also going to be provided by dagger for callers to use, and GetBooksService is pretty simple:
Copy code
//pseudocode
returnresponse = apolloClient.query(GetBooksQUery(10)).execute()
so GetBooksService is pretttttty thin, but is there anything stateful about it? This is important for me to know because I currently have the service marked as a
@Singleton
but i know marking something as a singleton thats not stateful is wasteful
b

bod

02/10/2023, 3:30 PM
pretty sure you can make it not a singleton
c

Colton Idle

02/10/2023, 3:38 PM
Got it. Will mark it as a @Multiton (😂)
9 Views