0.9.6 • Published 4 years ago

express-graphql-multimode v0.9.6

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

GraphQL HTTP Server Middleware

The packacge is built using express-graphql. This package has an additional features that it can serve xml response.

Installation

npm install --save express-graphql-multimode

Simple Setup

Just mount express-graphql-multimode as a route handler:

const express = require('express');
const graphqlHTTP = require('express-graphql-multimode');

const app = express();

//make it to send xml response
const mode = {"name" : "xml"}

app.use(
  '/graphql',
  graphqlHTTP({
    mode : mode,
    schema: MyGraphQLSchema,
    graphiql: true,
  }),
);

app.listen(4000);