Repository navigation
node graphql firestore api tutorial
This tutorial tries to elaborate, "How to create a graphQL-API with node js".
Grapqhl is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. Documentation for the same can be found here
We shall use the following resources for the purposes of this tutorial. It would be helpful if you are conversant with them.
This is a node-js based tutorial and therefore prior knowledge of it is helpful 😊
We need to setup a node project using node's package manager, therefore create a directory and cd into it.
* mkdir node-graphql-tutorial
* cd node-graphql-tutorial
* then run npm init
kamau-brian@mtotodev:~/WebstormProjects/node-grapqhl$ **npm init**
Press ^C at any time to quit.
package name: (grapqhl) grapqhl
version: (1.0.0) 1.0.0
description: this is a graphql tutorial
entry point: (index.js) index.js
test command:
git repository: push your code to a git repository
keywords: node, grapqhl
author: Write your name here
license: (ISC) ISC
About to write to /home/kamau-brian/WebstormProjects/node-grapqhl/package.json:
**{**
**"name": "grapqhl",**
**"version": "1.0.0",**
**"description": "this is a graphql tutorial",**
**"main": "index.js",**
**"scripts": {**
**"test": "echo \"Error: no test specified\" && exit 1"**
**},**
**"repository": {**
**"type": "git",**
**"url": "push your code to a git repository"**
**},**
**"keywords": [**
**"node",**
**"grapqhl"**
**],**
**"author": "Write your name here",**
**"license": "ISC"**
**}**
**Is this OK? (yes) yes**
kamau-brian@mtotodev:~/WebstormProjects/node-grapqhl$