1.0.1 • Published 6 years ago
micro-playground v1.0.1
micro-playground
a wrapper for graphql-playground-html in micro apps
usage
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'
);