@qlschema/mongoose

0.4.1 • Public • Published

@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.

Package Sidebar

Install

npm i @qlschema/mongoose

Weekly Downloads

5

Version

0.4.1

License

GPL-3.0

Unpacked Size

11.6 kB

Total Files

6

Last publish

Collaborators

  • luis.bs