@copropr/graphql-plugin
v0.0.4
Published
A graphql plugin that loads resolvers and types and exposes middlewares
Downloads
2
Maintainers
Readme
Graphql Plugin
A plugin that wraps a few graphql utility like apollo and gqlTools & setup your project easily
Introduction
This plugin will load your resolvers
Installation
# NPM
$ npm i -S @copropr/graphql-plugin
# Yarn
$ yarn add @copropr/graphql-plugin
Usage
// Commonjs
const GqlPlugin = require('@copropr/graphql-plugin').default
// ES6 module way
import GqlPlugin from '@copropr/graphql-plugin'
const graphqlPlugin = new GqlPlugin({
resolverDir: 'path/to/resolver/dir',
typeDefDir: 'path/to/typedef/dir',
logger: console
})
Note: Be sure to include the .instace
since this plugin will not wrap
bunyan instance of the logger