A Simple graphql tutorial on node js with grapqhl and firebase
- Clone the repo
under api, create config/ then put your service-account.json,
- Run
npm install
- Run
npm run start
http://localhost:3000/api/v1/graphql
- Use the provided graphiql interface provided to test the below 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
}
}
yarn test
or
npm test
For a detailed tutorial, checkout this wiki.