You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some context first, we use rest endpoints for unauthenticated requests (login, password reset requests etc) and GraqhQL for authenticated requests. I would like for all our client requests to be GraphQL. I was thinking of using directives that would an anonymous context key set to true and then check for that key in our auth/user context injection middleware. The middleware are called before the gql handler shown below that checks the directives
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have an interesting problem.
Some context first, we use rest endpoints for unauthenticated requests (login, password reset requests etc) and GraqhQL for authenticated requests. I would like for all our client requests to be GraphQL. I was thinking of using directives that would an anonymous context key set to true and then check for that key in our auth/user context injection middleware. The middleware are called before the gql handler shown below that checks the directives
The main issue is that our custom middleware will return 401 before we even reach here. I found this article but the implementation looks gimmicky
Has anyone encountered such an issue?
Beta Was this translation helpful? Give feedback.
All reactions