kamaubrian / node-graphql-tutorial

A Simple graphql tutorial on node js with grapqhl and firebase

Home Page:https://us-central1-node-grapqhl-api.cloudfunctions.net/grapqhlapi/api/v1/graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

node-graphql-tutorial

A Simple graphql tutorial on node js with grapqhl and firebase

Installation

  1. Clone the repo
  2. under api, create config/ then put your service-account.json,
  3. Run npm install
  4. Run npm run start
  5. http://localhost:3000/api/v1/graphql
  6. Use the provided graphiql interface provided to test the below requests.

Sample Requests

 /api/v1/graphql
 
 Fetching posts: 
 
    query{
      posts {
        description
        title
        author
      }
    }
    
 Creating Posts: 
 
     mutation {
       createPost(postInput:{author:"Brian Kamau",title:"Out with you",description:"It has been real",date:"24th Nov 2018"}){
         title
         description
       }
     }
   
    
    
   

Running Tests

yarn test

    or
    
npm test    

For a detailed tutorial, checkout this wiki.

About

A Simple graphql tutorial on node js with grapqhl and firebase

https://us-central1-node-grapqhl-api.cloudfunctions.net/grapqhlapi/api/v1/graphql

License:MIT License


Languages

Language:JavaScript 100.0%