Android-CleanArchitecture-Kotlin icon indicating copy to clipboard operation
Android-CleanArchitecture-Kotlin copied to clipboard

How to handle REST and GraphQL?

Open gameunite opened this issue 5 years ago • 1 comments

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 {}
}

gameunite avatar Jun 20 '20 01:06 gameunite

@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... :(

android10 avatar Feb 12 '21 20:02 android10