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

Use base class for errors in anonymous enum classes #5022

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

rmosolgo
Copy link
Owner

Fixes #5016

@rmosolgo rmosolgo added this to the 2.3.10 milestone Jul 16, 2024
@rmosolgo rmosolgo merged commit 79573a5 into master Jul 16, 2024
14 checks passed
# Don't assign a custom error class to anonymous classes
# because they would end up with names like `#<Class0x1234>::UnresolvedValueError` which messes up bug trackers
child_class.const_set(:UnresolvedValueError, Class.new(Schema::Enum::UnresolvedValueError))
end

Choose a reason for hiding this comment

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

👍

I suspect that the same issue exists here:

https://github.com/rmosolgo/graphql-ruby/blob/v2.3.8/lib/graphql/schema/member/has_unresolved_type_error.rb#L10

Does it make sense to fix it as well?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ah, good call! #5023

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.

Some exception class names are unstable when using GraphQL::Schema.from_definition
2 participants