Skip to content

Commit

Permalink
introduce modified field types
Browse files Browse the repository at this point in the history
  • Loading branch information
twof committed Nov 2, 2021
1 parent 5e8db9d commit 991bd1c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion spec/Section 6 -- Execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,23 @@ set or coercing a scalar value.
ExecuteField(objectType, objectValue, fieldType, fields, variableValues):
* Let {field} be the first entry in {fields}.
* Let {fieldName} be the field name of {field}.
* Let {requiredStatus} be the required status of {field}.
* Let {argumentValues} be the result of {CoerceArgumentValues(objectType, field, variableValues)}
* Let {resolvedValue} be {ResolveFieldValue(objectType, objectValue, fieldName, argumentValues)}.
* Return the result of {CompleteValue(fieldType, fields, resolvedValue, variableValues)}.
* Let {modifiedFieldType} be {ModifiedOutputType(fieldType, requiredStatus)}.
* Return the result of {CompleteValue(modifiedFieldType, fields, resolvedValue, variableValues)}.

ModifiedOutputType(outputType, requiredStatus):
* If {requiredStatus} is 'required' and {outputType} is not a Non-Nullable type:
* Return Non-Null with an inner type of {outputType}.
* Otherwise if {requiredStatus} is 'optional':
* If {outputType} is not a Non-Nullable type:
* Return {outputType}.
* Otherwise if {outputType} is a Non-Nullable type:
* Let {innerOutputType} be the inner type of {outputType}.
* Return {innerOutputType}.
* Otherwise:
* Return {outputType}.


### Coercing Field Arguments
Expand Down

0 comments on commit 991bd1c

Please sign in to comment.