-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
CamelCase vs snake_case (again) #4918
Comments
Hey, thanks for the suggestion. I'm open to it, it looks like DidYouMean has a handy direct-use API: https://github.com/ruby/did_you_mean?tab=readme-ov-file#using-the-didyoumeanspellchecker Want to give it a shot? Here's where the "field doesn't exist on type" error is created: graphql-ruby/lib/graphql/static_validation/rules/fields_are_defined_on_type.rb Lines 17 to 21 in 4e241f8
You can get the options for field names using: visible_fields = context.warden.fields(parent_type) # filter out any hidden fields
possible_field_names = visible_fields.map(&:graphql_names) I expect that plenty of existing tests will fail -- and pass after they're updated to contain "did you mean ..." ✨ Let me know what you think! |
Is your feature request related to a problem? Please describe.
I'm constantly caught between switching between camelCase and snake_case as addressed in these previous issues:
Describe the solution you'd like
if content comes in snake_case then displaying a warning "did you mean..." snakeCase would be great. #4563
Describe alternatives you've considered
none.
Additional context
I know this is re-opening a previous issue, however, I think enough programmers screw up often enough that a few minutes from everyone's time adds up to be a lot of time.
Would you please reconsider working on #4563 as this would save many people a little bit of time and greatly improve progarmmer expierence.
Regards,
-daniel
The text was updated successfully, but these errors were encountered: