Skip to content
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

Handle context.warden being nil #4503

Merged
merged 2 commits into from
Jun 5, 2023
Merged

Conversation

aericson
Copy link
Contributor

@aericson aericson commented Jun 5, 2023

Before #4433, from_context returned PassThruWarden when context.warden was nil.

This could happen, for example, when #warden falls back to query.warden which could have been initialized with warden: nil.

Copy link
Owner

@rmosolgo rmosolgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely game for this change, but I'd like to include a test so I don't accidentally break it in the future. Do mind adding one? If not, I'll circle back and add one soon.

lib/graphql/schema/warden.rb Show resolved Hide resolved
@aericson
Copy link
Contributor Author

aericson commented Jun 5, 2023

I'm definitely game for this change, but I'd like to include a test so I don't accidentally break it in the future. Do mind adding one? If not, I'll circle back and add one soon.

Should have done it before 😅. I've now added it on warden_spec.rb. Do you have a better suggestion for it?

@rmosolgo
Copy link
Owner

rmosolgo commented Jun 5, 2023

Awesome, thanks!

@rmosolgo rmosolgo merged commit 6871cc4 into rmosolgo:master Jun 5, 2023
13 checks passed
@rmosolgo rmosolgo added this to the 2.0.23 milestone Jun 5, 2023
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.

None yet

2 participants