Can i use redirects in mutations? #2394
Unanswered
niklasgrewe
asked this question in
Q&A
Replies: 1 comment 13 replies
-
|
Currently that's not possible, and it's unlikely we will change it. Queries and mutations are set up to not expose http by default. In your case here, I suggest doing the redirect on the client right after login. Or possibly even adding the username to the session publicData and then have a declarative hook that redirects to a setup page if username is missing. |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
i use a mutation for login. New users who have not yet set a username etc. should be redirected to another page. Can I do redirects only with
res.redirector in thegetServerSidePropsfunction but not in mutations? I would like to set redirects directly in the mutation function, like this:Beta Was this translation helpful? Give feedback.
All reactions