@qlschema/mongoose
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/mongooseor using yarn:
yarn add @qlschema/core @qlschema/mongooseImplement
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
Typessupport to improve the versatility.
Help
Actually this repo isn't powerful need work and tests, but you can help to make it better.