graphiql-middleware
v0.0.4
Published
GraphiQL Middleware e.g. for Express
Downloads
41
Readme
GraphiQL Middleware
Middleware for serving GraphiQL.
Works with Express and any other server that supports middleware of the format (_, {set, send}) => ()
API
graphiqlMiddleware(options, props)
Where options
are:
- endpointURL
And props
are serializable GraphiQL component props.
Usage
import { graphiqlMiddleware } from 'graphiql-middleware';
app.use(
'/graphiql',
graphiqlMiddleware({
endpointURL: '/graphql',
}, {
headerEditorEnabled: true,
shouldPersistHeaders: true
})),
);