benawad / graphql-express-template

Node.js GraphQL Server template
524 stars 195 forks source link

Response Cookies Undefined #10

Closed sjakati98 closed 6 years ago

sjakati98 commented 6 years ago

Hey!

So I am currently having the problem that within the resolvers file res.cookie('token', token, options...), I do not believe that the cookies are being set. I suspect this because within my index file, the req.cookies.token is empty.

benawad commented 6 years ago

Check the network tab of Chrome, look for the request, and see if a SET-COOKIE header is being sent back

sjakati98 commented 6 years ago

So I think I may have realized the issue. By using the graphiql client, I believe that the cookies are stripped from the request. This kinda makes it hard to set a cookie haha. Thanks for the tutorials and all the help!