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
- Host: GitHub
- URL: https://github.com/amanjeetsingh150/graphql-android
- Owner: amanjeetsingh150
- Created: 2018-02-01T21:36:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-01T22:21:58.000Z (over 8 years ago)
- Last Synced: 2025-04-07T04:41:24.370Z (about 1 year ago)
- Topics: android, apollo-android, apollo-client, apollographql, graphql, kotlin-android
- Language: Kotlin
- Size: 4.45 MB
- Stars: 53
- Watchers: 2
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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: