express-graphql-multimode
v0.9.6
Published
Production ready GraphQL HTTP middleware.
Downloads
4
Maintainers
Readme
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);