<commit_before>[![Stories in Ready](https://badge.waffle.io/malpercio/sails-hook-mlprciographql.png?label=ready&title=Ready)](https://waffle.io/malpercio/sails-hook-mlprciographql)
# sails-hook-mlprciographql

## About
A [sails](http://sailsjs.org/) hook aimed at simplifying GraphQL integration.

## Installation

```
npm install git+https:https://github.com/malpercio/sails-hook-mlprciographql.git
```<commit_msg>Modified README<commit_after>[![Stories in Ready](https://badge.waffle.io/malpercio/sails-hook-mlprciographql.png?label=ready&title=Ready)](https://waffle.io/malpercio/sails-hook-mlprciographql)
# sails-hook-mlprciographql

## About
A [sails](http://sailsjs.org/) hook aimed at simplifying GraphQL integration.

## Installation

```
npm install --save sails-hook-mlprciographql
```

## Usage

After installing, (and configuring the database to your liking) you can summon ´sails.graphql´ to receive a [Promise](https://developer.mozilla.org/es/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Promise) like so:

´´´javascript
//For the default controller
index(req, res) {
    sails.graphql(req)
    .then((result) => {
      //Very important statements
      return res.json(result.data);
    })
    .catch((err)=>{
      //Oops.
      res.send(500, err);
    });
  }
´´´
{'fraction_non_alphanumeric': 0.1585081585081585, 'fraction_numerical': 0.002331002331002331, 'mean_word_length': 4.6244541484716155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5148842', 'n_tokens_mistral': 473, 'n_tokens_neox': 453, 'n_words': 75}