0.0.4 • Published 6 years ago

@copropr/graphql-plugin v0.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

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*