Skip to content

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

Notifications You must be signed in to change notification settings

amanjeetsingh150/GraphQL-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

   

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published