# serverless-plugin-graphiql

> Runs a local http server for graphiql and your graphql handler

Latest version **0.4.0** (published 2019-05-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install serverless-plugin-graphiql
pnpm add serverless-plugin-graphiql
yarn add serverless-plugin-graphiql
bun add serverless-plugin-graphiql
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2019-05-22 |
| First published | 2017-01-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Maintainers | global_1981 |
| Keywords | graphql, graphiql, aws, serverless, lambda, faas |

## Links

- npm: https://www.npmjs.com/package/serverless-plugin-graphiql
- Repository: https://github.com/bencooling/serverless-plugin-graphiql
- Homepage: https://github.com/bencooling/serverless-plugin-graphiql#readme
- Issues: https://github.com/bencooling/serverless-plugin-graphiql/issues
- npm.io page: https://npm.io/package/serverless-plugin-graphiql

## Dependencies (2)

- [babel-register](https://npm.io/package/babel-register.md) ^6.22.0
- [aws-event-mocks](https://npm.io/package/aws-event-mocks.md) github:serverless/aws-event-mocks

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2019-05-22
- 0.3.0 — 2017-03-09
- 0.2.1 — 2017-02-01
- 0.1.4 — 2017-01-20
- 0.1.3 — 2017-01-20
- 0.1.2 — 2017-01-20
- 0.1.1 — 2017-01-20
- 0.1.0 — 2017-01-20

## README

# serverless-plugin-graphiql

> Runs a local http server for graphiql and your graphql handler

[![Build Status](https://travis-ci.org/bencooling/serverless-plugin-graphiql.svg?branch=master)](https://travis-ci.org/bencooling/serverless-plugin-graphiql)
[![Coverage Status](https://coveralls.io/repos/github/bencooling/serverless-plugin-graphiql/badge.svg?branch=master)](https://coveralls.io/github/bencooling/serverless-plugin-graphiql?branch=master) [![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
[![Npm Version](
https://img.shields.io/npm/v/serverless-plugin-graphiql.svg)](https://www.npmjs.com/package/serverless-plugin-graphiql)


## Usage
See `/example` directory for how easily it's done!  

**Steps**  
1. Create a lambda function named graphql that implements a graphql server  
2. Add `serverless-plugin-graphiql` to serverless plugins array  
3. Run `sls graphiql` command from root of serverless project  
4. Visit `localhost:8000/graphql` in your browser to use graphiql


## About  
- This plugin creates two http endpoints:  
```
GET /graphql
POST /graphql
```
- Once graphiql is running, you can also make requests via cli:
```bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{"query": "{ hello }"}' \
localhost:8000/graphql
```

## Options  
```
--function -f   function name in serverless.yml for graphql handler, Default: graphql
--port -p       port for local http server to listen on, Default: 8000
```


## Requirements
- Node.js > v6.0

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