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

Add special deprecation_reason handling for faster introspection #4356

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

rmosolgo
Copy link
Owner

Fixes #4350

@rmosolgo rmosolgo added this to the 2.0.18 milestone Feb 22, 2023
@rmosolgo rmosolgo merged commit 9a74710 into master Feb 22, 2023
@rmosolgo rmosolgo deleted the faster-deprecation-reason branch February 22, 2023 20:32
if defined?(@deprecation_reason) && @deprecation_reason
remove_directive(GraphQL::Schema::Directive::Deprecated)
end
@deprecation_reason = text
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this line always be run? If text is nil, we would want to reset @deprecation_reason in case of future deprecated_reason usage?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ahh, good catch! Thanks for taking a look, I pushed a test for this case and a fix in 682e94f

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.

Remember Deprecated directive reference
2 participants