0.4.1 • Published 7 years ago

@qlschema/mongoose v0.4.1

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
7 years ago

@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 typesGraphQL types
ObjectIdID
StringString
NumberInt
Double@mongoosejs/doubleFloat
All othersString

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.