Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@qlschema/mongoose

luisbs1GPL-3.00.4.1

Mongoose parser for QLSchema

GraphQL, Mongoose, MongoDB, QLSchema

readme

@qlschema/mongoose

version downloads dependencies

QLSchema parser for Mongoose models.

The @qlschema/mongoose is a @QLSchema parser. Use Mongoose models specification to construct a valid GraphQL schema making short and easier for developers.

Install

Is necessary the @qlschema/core package. Using npm:

npm install @qlschema/core @qlschema/mongoose

or using yarn:

yarn add @qlschema/core @qlschema/mongoose

Implement

First append the parser in the constructor @qlschema/core.

const qlschema = require('@qlschema/core')({
  databases: ['mongoose']
});

Example

To show it in action see the example.

Support

Today this plugin support this characteristics.

Supported Types

Mongoose types GraphQL types
ObjectId ID
String String
Number Int
Double
@mongoosejs/double
Float
All others String

TODO

A list of proyected stuff that can be add in the future.

  • Add Types support to improve the versatility.

Help

Actually this repo isn't powerful need work and tests, but you can help to make it better.