add back limit setting

This commit is contained in:
eric-burel 2019-01-09 16:58:28 +01:00
parent e199fba6fb
commit b0e63d8b61

View file

@ -81,8 +81,11 @@ const createApolloServer = ({
WebApp.connectHandlers.use(universalCookiesMiddleware()); WebApp.connectHandlers.use(universalCookiesMiddleware());
// parse request // parse request
WebApp.connectHandlers.use(bodyParser.json()); WebApp.connectHandlers.use(bodyParser.json({ limit: getSetting('apolloServer.jsonParserOptions.limit') }));
WebApp.connectHandlers.use(config.path, bodyParser.text({ type: 'application/graphql' })); WebApp.connectHandlers.use(
config.path,
bodyParser.text({type: 'application/graphql'})
);
// Provide the Meteor WebApp Connect server instance to Apollo // Provide the Meteor WebApp Connect server instance to Apollo
// Apollo will use it instead of its own HTTP server // Apollo will use it instead of its own HTTP server
@ -168,8 +171,8 @@ Meteor.startup(() => {
}, },
apolloApplyMiddlewareOptions: { apolloApplyMiddlewareOptions: {
bodyParser: false, // added manually later bodyParser: false, // added manually later
...getApolloApplyMiddlewareOptions() ...getApolloApplyMiddlewareOptions(),
} },
// config: .... // config: ....
// contextFromReq: .... // contextFromReq: ....
}); });