Skip to content

Commit 9b7bfd5

Browse files
committed
Add non-normative note about memoizing default value coercion
1 parent 2838c4f commit 9b7bfd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/Section 6 -- Execution.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,10 @@ Note: Variable values are not coerced because they are expected to be coerced
614614
before executing the operation in {CoerceVariableValues()}, and valid queries
615615
must only allow usage of variables of appropriate types.
616616

617+
Note: As an optimization you might choose to coerce each {defaultValue} at
618+
schema build time and cache the results, then refer to this cache within
619+
{CoerceArgumentValues()} calls.
620+
617621

618622
### Value Resolution
619623

0 commit comments

Comments
 (0)