1.5.0 • Published 7 months ago

@insaner/graphql v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

GraphQL-HTTP bridge for Insaner

This plugin bridges the reference graphql-http implementation into Insaner.

Installation:

npm install --save @insaner/graphql

Usage:

import { HttpServer } from 'insaner';
import { GraphQLHandler } from '@insaner/graphql';

const server = new HttpServer();

server.router.post(/^\/?graphql\/?$/, new GraphQLHandler({
  schema: makeExecutableSchema({ ... }),
  context: () => new Context(),
  root: myRootObject,
}));