sdy

update GraphQL context

......@@ -3,18 +3,12 @@ dotenv.config();
import { GraphQLServer } from "graphql-yoga";
import morgan from "morgan";
import schema from "./schema";
import { prisma } from "./utils";
const PORT = process.env.PORT;
const server = new GraphQLServer({
schema,
context: (request) => {
return {
...request,
prisma,
};
},
context: ({ request }) => ({ request }),
});
server.express.use(morgan("dev"));
......