Tag: req
-
Passing request parameter into middleware which uses ‘createHandler’ function of ‘graphql-http’
0 I have created an express server which uses GraphQL for handling requests over HTTP. Among others, the express server has the two middlewares below. app.use(authenticate); app.use(‘/graphql’, createHandler({ schema })); The authenticate middleware invokes a function which has req, res and next as parameters and in certain conditions assigns a value to req.user. How can…
-
Passing request parameter into middleware using createHandler function of graphql-http
0 I have created an express server which uses GraphQL for handling requests over HTTP. Among others, the express server has the two middlewares below. app.use(authenticate); app.use(‘/graphql’, createHandler({ schema })); The authenticate middleware invokes a function which has req, res and next as parameters and in certain conditions assigns a value to req.user. How can…