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

I get enum-warnings for an external schema, how to fix? #62

Closed
wuarmin opened this issue Feb 27, 2025 · 3 comments
Closed

I get enum-warnings for an external schema, how to fix? #62

wuarmin opened this issue Feb 27, 2025 · 3 comments

Comments

@wuarmin
Copy link
Contributor

wuarmin commented Feb 27, 2025

Hey 👋 ,

maybe somebody can help here? I get following warnings, when I execute a query:

Failed to define value method for :ai, because Country already responds to that method. Use `value_method:` to override the method name or `value_method: false` to disable Enum value method generation.
Failed to define value method for :comment, because ActivityType already responds to that method. Use `value_method:` to override the method name or `value_method: false` to disable Enum value method generation.
Failed to define value method for :class, because Reason already responds to that method. Use `value_method:` to override the method name or `value_method: false` to disable Enum value method generation.
Failed to define value method for :ai, because EncashmentType already responds to that method. Use `value_method:` to override the method name or `value_method: false` to disable Enum value method generation.

How to fix them?

Update:

@rmosolgo I think this warning comes from graphql-ruby-gem. Is it possible to disable the enum-method-gen completely? It's an external schema, so I do not define enums manually.

thanks

@gmac
Copy link

gmac commented Feb 27, 2025

See rmosolgo/graphql-ruby#5254 (comment). I'd suggest locking on v2.4.8 for now then upgrading strait to v2.4.11 when it's available.

@rmosolgo
Copy link
Collaborator

Hey, I just shipped GraphQL-Ruby v2.4.11 which will turn these warnings off by default. Thanks for reporting this and sorry for the trouble!

@wuarmin
Copy link
Contributor Author

wuarmin commented Feb 28, 2025

Thank you @rmosolgo.

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

No branches or pull requests

3 participants