Skip to content

A Sails.js hook to generate a GraphQL schema from sails models.

License

Notifications You must be signed in to change notification settings

larsbs/sails-hook-graysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Parameter Type Details
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.

About

A Sails.js hook to generate a GraphQL schema from sails models.

Resources

License

Stars

Watchers

Forks

Packages

No packages published