An open API service indexing awesome lists of open source software.

https://github.com/mguardarini/graphql-mongoose-example

This is a simple example to help on implementation of GraphQL, mongoose and JWT
https://github.com/mguardarini/graphql-mongoose-example

api es6 express-graphql graphql javascript jwt mongodb-database mongoose

Last synced: 2 months ago
JSON representation

This is a simple example to help on implementation of GraphQL, mongoose and JWT

Awesome Lists containing this project

README

          

![](https://qph.ec.quoracdn.net/main-qimg-c3ed01cd2989f03dea73b3e7465db641)

### Link to [GraphQL](http://graphql.org/learn/) documentation

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.

## Getting Started

Using a node.js server? Just use express-graphql! It can automatically present GraphiQL, if you using another GraphQL service? GraphiQL is relatively easy to set up. With npm:

##### Install the packages:

This example uses GraphQL, Mongoose and JWT.

You can install the packages in two ways:

```
npm install
```
If you have errors, please install package by package it's not a lot, right? :satisfied:

```
$ npm install --save express-graphql
```
```
$ npm install jsonwebtoken

```
```
$ npm install mongoose -save
```

### Features implemented:

* GraphQL: ✔

- Mutation. ✔
- Queries. ✔

* Connection database (Mongodb) with [Mongoose](http://mongoosejs.com/index.html) ✔

### Features in Development:

* Implementation of the [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken)

* Implementation of the Jest Framework for tests (
[Watch the presentation about Jest Framework by Sibelius Seraphini](https://jest-everywhere.now.sh/#/?_k=rhzeyv))

* Subscriptions :hushed:

**in development...**