Skip to content

penx/graphiql-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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
    })),
);

About

Middleware for serving GraphiQL e.g. with Express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published