Skip to content

How to write a plugin to set cookies in header of the response. #1565

Answered by n1ru4l
cxd9974 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @cxd9974, setting a cookie is implementation specific and depends on your specific use case.

E.g. if you use Node.js you can make the request and response object part of the GraphQL context. There you can set the cookie header on the http response object (https://nodejs.org/api/http.html#responsesetheadername-value)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cxd9974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants