android10 / Android-CleanArchitecture-Kotlin

This is a movies sample app in Kotlin, which is part of a serie of blog posts I have written about architecting android application using different approaches.
https://fernandocejas.com/2018/05/07/architecting-android-reloaded/
4.68k stars 928 forks source link

How to handle REST and GraphQL? #97

Open gameunite opened 4 years ago

gameunite commented 4 years ago

Should I just create an interface for the remote api then just process each api on its own class?

GetUserRest.kt

class GetUserRest : RemoteSource {
   fun process(): Data {}
}

GetUserGraphQL.kt

class GetUserGraphQL : RemoteSource {
   fun process(): Data {}
}
android10 commented 3 years ago

@gameunite That sounds legit. Have you achieve it? I'm interested in more details since I wanted to play around GraphQL too...still did not have time... :(