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

https://github.com/amanjeetsingh150/graphql-android

A project for showing use of apollo-android for consuming github graphQL API
https://github.com/amanjeetsingh150/graphql-android

android apollo-android apollo-client apollographql graphql kotlin-android

Last synced: 9 months ago
JSON representation

A project for showing use of apollo-android for consuming github graphQL API

Awesome Lists containing this project

README

          

# GraphQL Android
The project has to applications:


  • First is ApolloGraphQLExample which uses apollo-android to auto generate the necessary JAVA models for graphQL queries.

  • Second is GraphQL which uses retrofit by just posting up raw queries with appropriate headers on the URL and getting results.




The first method is most recommended because it auto generates the code for models according to your queries. The advantage is that it decouples the graphql queries from the code which makes easier to code.


Medium: https://medium.com/@droid_singh/what-is-graphql-and-using-it-on-android-ab8e493abdd7


Query used


query {
repository(owner:"jakewharton", name:"butterknife") {
name
description
forkCount
url
}
}




query {
repository(owner:"amanjeetsingh150", name:"ubercaranimation") {
name
description
forkCount
url
}
}



The result of the above query is shown below:

Screenshots: