# graphql-crab

> Humanized way to use chains operation for Graphql

Latest version **0.0.4** (published 2019-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install graphql-crab
pnpm add graphql-crab
yarn add graphql-crab
bun add graphql-crab
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2019-03-07 |
| First published | 2019-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 156.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Timothy |
| Maintainers | ygmpkk |

## Links

- npm: https://www.npmjs.com/package/graphql-crab
- Repository: https://github.com/ygmpkk/graphql-crab
- npm.io page: https://npm.io/package/graphql-crab

## Recent versions

- 0.0.4 (latest) — 2019-03-07
- 0.0.3 — 2019-03-07
- 0.0.2 — 2019-03-06
- 0.0.1 — 2019-03-06

## README

# Humanized way to use chains operation for Graphql

> Happy use Graphql without crab

## Usage

ES5

```javascript
const gql = require("graphql-crab");
```

ES6

```javascript
import gql from "graphql-crab";
```

Browser

```javascript
var gql = GraphqlCrab;
```

### Query

```graphql
const query = gql`
query($user: User, $page: Int, $perPage: Int) {
  getUser(input: $user) {
    userId
    name
    age
  }
}
`

const payload = query.user({name: "Tim"}).page(1).perPage(10).toJSON()
```

payload

```
{
    "query": `query($user: User, $page: Int, $perPage: Int) {
      getUser(input: $user) {
        userId
        name
        age
      }
    }`,
    "variables": {
      "user": {
        "name": "Timothy",
      },
      "page": 1,
      "perPage": 10,
    },
}
```

## License MIT

---
_Source: https://npm.io/package/graphql-crab · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
