Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tungv/micro-playground
- Owner: tungv
- Created: 2018-04-10T13:45:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T13:47:09.000Z (over 6 years ago)
- Last Synced: 2024-10-12T13:17:18.720Z (3 months ago)
- Language: JavaScript
- Homepage: https://npm.im/micro-playground
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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'
);
```