Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tungv/micro-playground

a wrapper for graphql-playground-html for zeit/micro apps
https://github.com/tungv/micro-playground

Last synced: about 2 months ago
JSON representation

a wrapper for graphql-playground-html for zeit/micro apps

Awesome Lists containing this project

README

        

# micro-playground

a wrapper for [graphql-playground-html](https://www.npmjs.com/package/graphql-playground-html) in micro apps

# usage

```js
const playground = require('micro-playground');
const { get, post, router } = require('microrouter');
const { microGraphql } = require('apollo-server-micro');

const schema = require('./my-schema.js');

const service = router(
get('/graphql', playground({ endpointURL: '/graphql' })),
post('/graphql', microGraphql({ schema })),
() => 'not found'
);
```