0.2.1 • Published 8 years ago

sails-hook-graysql v0.2.1

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

sails-hook-graysql

Sails.js hook to integrate sails models with GraysQL. This hooks allows us to create a GraphQL schema using GraysQL from the models of our application.

Installation

Install from NPM.

$ npm install --save sails-hook-graysql

Usage

That's it. When you install this hook, it will scan all your models and provide a GraphQL schema from them. You can access the generated GraphQL schema in /graphql or in the URL that you configure.

Configuration

By default, configuration lives in sails.config.graysql. The configuration key graysql can be changed by setting sails.config.hooks['sails-hooks-graysql'].configKey.

ParameterTypeDetails
url((string))The url in which sails will server the GraphQL schema. Defaults to /graphql.
graphiql((boolean))Whether or not sails should use graphiql.
ignored((list))A list of names of models to ignore.