This change improves diagnostics when performing manual/domain-specific post-validation of arguments using LookAheadArguments. In the case of an error, the produced error message may be able to refer to the exact position in the problematic GraphQL arguments.
On an unrelated note, I noticed LookAheadArgument does a deep/greedy transform of the InputValue to perform variable substitution. A potential improvement to this is to only do this lazily for each expansion step, i.e. the LookAheadArgument privately keeps a reference to its InputValue and the variable table and somehow exposes a LookAhead interface on top of this.
Continued from #1206
This change improves diagnostics when performing manual/domain-specific post-validation of arguments using LookAheadArguments. In the case of an error, the produced error message may be able to refer to the exact position in the problematic GraphQL arguments.
On an unrelated note, I noticed
LookAheadArgument
does a deep/greedy transform of theInputValue
to perform variable substitution. A potential improvement to this is to only do this lazily for each expansion step, i.e. the LookAheadArgument privately keeps a reference to itsInputValue
and the variable table and somehow exposes a LookAhead interface on top of this.