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

fix(event-handler): multi-value query string and validation of scalar parameters #3795

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

rubenfonseca
Copy link
Contributor

@rubenfonseca rubenfonseca commented Feb 19, 2024

Issue number: #3732

Summary

Changes

Please provide a summary of what's being changed

This PR fixes a bug when validating scalar parameters. After the code we've introduced to handle multiple parameters, the code become inconsistent (notice the Any type) in that some resolvers return scalar parameters and some others returned a list of parameters.

This caused problems when handling validation of scalar parameters. This code fixes that by ensuring the same behaviour in all event handlers, and updating the types accordingly.

User experience

Please share what the user experience looks like before and after this change

This PR will fix the issue on #3732

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 19, 2024
@rubenfonseca rubenfonseca changed the title fix(event-handler): handle single parameters correctly fix(event-handler): fix validation of scalar parameters Feb 19, 2024
@rubenfonseca rubenfonseca marked this pull request as ready for review February 19, 2024 12:44
@rubenfonseca rubenfonseca requested a review from a team as a code owner February 19, 2024 12:44
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

tiny changes

heitorlessa
heitorlessa previously approved these changes Feb 19, 2024
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

pre-approving, lemme know if more changes and I can approve again (I think only testing globals are left)

Copy link

Quality Gate Passed Quality Gate passed

Issues
3 New issues

Measures
0 Security Hotspots
No data about Coverage
2.8% Duplication on New Code

See analysis details on SonarCloud

@rubenfonseca
Copy link
Contributor Author

@heitorlessa reasking for a review since I did a lot of changes

@heitorlessa heitorlessa changed the title fix(event-handler): fix validation of scalar parameters fix(event-handler): multi-value query string and validation of scalar parameters Feb 19, 2024
@heitorlessa heitorlessa merged commit 36905b5 into develop Feb 19, 2024
15 checks passed
@heitorlessa heitorlessa deleted the rf/fix-single-params branch February 19, 2024 16:23
@heitorlessa heitorlessa added the bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working event_handlers size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants