rmosolgo / graphql-ruby

Ruby implementation of GraphQL
http://graphql-ruby.org
MIT License
5.37k stars 1.39k forks source link

Allow `validate_timeout` to be cleared/reset after being set #5062

Closed ravangen closed 1 month ago

ravangen commented 1 month ago

Objective

Allow for validate_timeout to be cleared such that the timeout behaviour is removed by setting a nil value. Technically 0 does work already.

Problem

nil is the default value so we cannot distinguish between a get and set.

Proposal

Use existing NOT_CONFIGURED sentinel value as the default argument value.

Outcome

A schema can have a default validate_timeout but can be overridden to be removed.

rmosolgo commented 1 month ago

Thanks for this improvement!