Skip to content

Conversation

vithushar
Copy link
Contributor

@vithushar vithushar commented Mar 21, 2025

Problem

Custom validators with I/O operations may fail unexpectedly due to GraphQL's default validate_timeout setting. Long-running I/O operations may not be terminated midway, resulting in unpredictable behavior.

See these PRs for more context:
Manual timeout implementation: #5263
Validate_timeout default value implementation: #5258

We should make the risk of adding I/O bound custom validators more "in your face" in the gem for consumers.

solution

Print a warning when a custom validator is registered.

Screenshot 2025-03-20 at 9 43 22 PM

@rmosolgo
Copy link
Owner

Hey, thanks for looking into this. What if we made validate_timeout I/O-safe instead? I think the visit hooks in this module could be the place for that:

Implementation-wise, it'd be very much like #5263. What do you think?

@vithushar
Copy link
Contributor Author

What if we made validate_timeout I/O-safe instead?

I'm very much on board with that. Let's do it!

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.

2 participants