Skip to content

Require selections on Unions, with backwards compat #5322

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

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Apr 8, 2025

Fixes #4351

This implementation:

  • Warns if an invalid query is encountered and no compat mode is selected;
  • Provides a hook for handing invalid queries (which can permit, deny, or provide a custom message)
  • Provides a config to reject invalid queries

I think this is a safe default to roll out to anyone already using the gem.

cc @gmac -- finally...

@rmosolgo rmosolgo added this to the 2.5.3 milestone Apr 8, 2025
@rmosolgo rmosolgo changed the title Require selections on Unions, with backwards compat option Require selections on Unions, with backwards compat Apr 8, 2025
@rmosolgo rmosolgo merged commit 789d141 into master Apr 11, 2025
15 checks passed
@rmosolgo rmosolgo deleted the selections-on-unions branch April 11, 2025 14:18
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.

fields_have_appropriate_selections does not require selections on union types
1 participant