sdy

update server.js

......@@ -3,10 +3,19 @@ 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 });
const server = new GraphQLServer({
schema,
context: (request) => {
return {
...request,
prisma,
};
},
});
server.express.use(morgan("dev"));
......