From the middleware (right now it says something like token: req.headers.token as string. We want our middleware to be a function that takes in (req, res) => and takes the req to get cookies and have context.auth = verifyToken(token from cookie).
We also want our context to pass in res so we can access context.res so we can set cookies with a Login/Register mutation.
token: req.headers.token as string
. We want our middleware to be a function that takes in (req, res) => and takes the req to get cookies and have context.auth = verifyToken(token from cookie).