The packacge is built using express-graphql. This package has an additional features that it can serve xml response.
npm install --save express-graphql-multimode
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);
Version | Tag | Published |
---|---|---|
0.9.6 | latest | 3yrs ago |