PR-727730: Updating packages and fixing sending the response in the context.

This commit is contained in:
2023-03-28 19:41:45 +00:00
parent cdcca7c999
commit 5f76672332
4 changed files with 135 additions and 113 deletions

View File

@ -2,4 +2,9 @@
declare module "*.gql" {
const content: any;
export default content;
}
declare module 'cookie-parse' {
const content: any;
export default content;
}

View File

@ -1,7 +1,6 @@
'use strict';
import express from 'express'; //express
// import { graphqlHTTP } from 'express-graphql';
import { createHandler } from 'graphql-http/lib/use/express';
import schema from '@src/GraphQL/schema';
@ -12,7 +11,10 @@ server.use(
'/',
createHandler({
schema,
context: (req, res) => ({ req, res })
context(req) {
const res = req.context.res
return {req, res};
},
})
);