Skip to content
Discussion options

You must be logged in to vote

I had trouble trying to find where $context was assigned to Auth::user() by default.

That's coming from AddAuthUserContextValueMiddleware which by default is added via execution_middleware in the config

Rebing\GraphQL\Support\ExecutionMiddleware\AddAuthUserContextValueMiddleware::class,

You can remove or replace this execution middleware and inject into your resolver whatever you need.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

mfn
Nov 3, 2025
Collaborator

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

@mfn
Comment options

mfn Nov 4, 2025
Collaborator

@drewgallagher
Comment options

@mfn
Comment options

mfn Nov 5, 2025
Collaborator

Answer selected by drewgallagher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants