Skip to content

Improve how InjectUser handles unauthenticated user #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

oprypkhantc
Copy link
Contributor

Closes #572

I've decided not to go for default value support, e.g. #[InjectUser] User $user = new User() will be treated exactly the same as #[InjectUser] User $user - requires authentication. This is because graphqlite doesn't allow to easily "not pass a value" to an optional parameter, so I didn't want to dive deep for an unlikely use case.

@oojacoboo oojacoboo merged commit b5af49e into thecodingmachine:master Mar 11, 2023
@oprypkhantc oprypkhantc deleted the inject-user-exception branch March 11, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve #[InjectUser] to throw authentication errors
2 participants