Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 994 Bytes

Readme.md

File metadata and controls

29 lines (25 loc) · 994 Bytes

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