Skip to content

Setting a header output? #884

Answered by KATT
Lilja asked this question in Q&A
Sep 4, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Check the websockets example if you want to see an example with cookie based auth, the cookie can then be picked up in createContext on the server and resolved to a user that is passed through to each resolver.

Cookies are the only way if you want server-side rendering.

If you're making an SPA or a RN-app you can use auth headers which can be picked up from local storage or whatever.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@KATT
Comment options

@KATT
Comment options

@Lilja
Comment options

@KATT
Comment options

Answer selected by KATT
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