An open API service indexing awesome lists of open source software.

https://github.com/jarroyoesp/graphql-example

Android App to show how to consume a request using ApolloGraphQL
https://github.com/jarroyoesp/graphql-example

android apollographql clean-architecture kotlin

Last synced: 29 days ago
JSON representation

Android App to show how to consume a request using ApolloGraphQL

Awesome Lists containing this project

README

        

# Architecture

# Languages, libraries and tools used

* [Apollo GraphQL](https://www.apollographql.com/)
* [Kotlin](https://kotlinlang.org/)
* [Kotlin-Coroutines + Flow](https://kotlinlang.org/docs/reference/coroutines-overview.html)
* [LiveData](https://developer.android.com/topic/libraries/architecture/livedata)
* [Android Architecture Components](https://developer.android.com/topic/libraries/architecture/index.html)
* Android X Core
* [Hilt-Dagger](https://dagger.dev/hilt/)
* [Room](https://developer.android.com/topic/libraries/architecture/room.html)
* [Mockito](http://site.mockito.org/)
* [Espresso](https://developer.android.com/training/testing/espresso/index.html)

# App

Use this to generate schema.graphqls:

```
./gradlew downloadApolloSchema \
--endpoint="https://rickandmortyapi.com/graphql" \
--schema="app/src/main/graphql/com/jarroyo/schema.graphqls"
```
GraphQL queries used:

```
query GetCharacters{
characters {
results {
id,
name,
image
}
}
}
```