Skip to content

Latest commit

 

History

History

graphql

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

graphql

graphql middleware for nanoexpress

Installation

npm i @nanoexpress/middleware-graphql
# or
yarn add @nanoexpress/middleware-graphql

Caveats

  • This middleware provides only HTTP bindings
  • For subscription support, please use graphql-ws

Example

See the examples directory

Usage

ESM Module

import graphql from '@nanoexpress/middleware-graphql';

app.post('/graphql', graphql(GraphQLSchema));

CJS Module

const graphql = require('@nanoexpress/middleware-graphql/cjs');

app.post('/graphql', graphql(GraphQLSchema));

Options

Please refer to here or here for more information

License

MIT