Skip to content

cristianonescu/Graphql-Android-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

ANDROID GRAPHQL SETUP - using graphcool and apollo

Usage

  1. setup NPM (if you don't have it already)
  2. install graphcool:
    $ npm install -g graphcool
  1. install apollo codegen:
    $ npm install -g apollo-codegen
  1. generate your schema:
    $ apollo-codegen introspect-schema https://urlsche.ma/blablabla —output schema.json
  1. paste the schema.json over the current schema.json inside project
  2. replace files deletePost.graphql, getAllPosts.graphql, newPosts.graphql with your own mutations ( test them in the playground. also check this documentation: https://www.graph.cool/docs/reference/graphql-api/mutation-api-ol0yuoz6go#overview ) ——————— if new mutations were added, rebuild project in order to generate the sourcefiles
  3. In MyApolloClient replace the BASE_URL with your graphql link (Check graphcool->endpoints)

Todo:

  • Dialog to notify user when action is performed

Features:

  • delete
  • add
  • list all

About

Graphql demo android app using Apollo and Graphcool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages