@@ -615,18 +615,22 @@ raises an _execution error_, the error must be added to the {"errors"} list in
615615the _ execution result_ and then handled according to the _ error behavior_ of the
616616request:
617617
618- - {"NULL"}: The _ response position_ must be set to {null}. (The client is
619- responsible for interpreting this {null} in conjunction with the {"errors"}
620- list to distinguish error results from intentional {null} values.)
618+ - {"NULL"}: The _ response position_ must be set to {null}, even if such position
619+ is indicated by the schema to be non-nullable. (The client is responsible for
620+ interpreting this {null} in conjunction with the {"errors"} list to
621+ distinguish error results from intentional {null} values.)
621622- {"PROPAGATE"}: The _ execution error_ must propagate to the parent _ response
622623 position_ (the entire selection set in the case of a field, or the entire list
623624 in the case of a list position). The parent position resolves to {null} if
624625 allowed, or else the error is further propagated to a parent response
625626 position. Any sibling response positions that have not yet executed or have
626627 not yet yielded a value may be cancelled to avoid unnecessary work.
627- - {"HALT"}: The entire _ request_ must be cancelled. The {"data"} entry in the
628- _ response_ must be {null}. Any _ response position_ that has not yet executed
629- or has not yet yielded a value may be cancelled to avoid unnecessary work.
628+ - {"HALT"}: The current {ExecuteRootSelectionSet()} must be aborted immediately
629+ and must yield an execution result with an {"errors"} list consisting of this
630+ _ execution error_ only and the {"data"} entry set to {null}. Any _ response
631+ position_ that has not yet executed or has not yet yielded a value may be
632+ cancelled to avoid unnecessary work. (Note: For a subscription operation the
633+ underlying stream is not terminated.)
630634
631635Note: See [ Handling Execution Errors] ( #sec-Handling-Execution-Errors ) for more
632636about this behavior.
@@ -943,7 +947,7 @@ Valid values for _error behavior_ are {"NULL"}, {"PROPAGATE"} and {"HALT"}.
943947compatibility with existing clients, services should default to {"PROPAGATE"}
944948which reflects prior behavior. <!-- For new services, {"NULL"} is
945949recommended. --> The default error behavior is indicated via the {"org.graphql.defaultErrorBehavior"}
946- _ capability _ .
950+ _ service capability _ .
947951
948952Note: {"HALT"} is not recommended as the _ default error behavior_ because it
949953prevents generating partial responses which may still contain useful data.
@@ -993,6 +997,10 @@ result_ should be {null}.
993997
994998** {"HALT"}**
995999
996- With {"HALT"}, execution must cease immediately when the first _ execution error_
997- is raised. That error must be added to the {"errors"} list, and {"data"} must be
998- {null}.
1000+ With {"HALT"}, {ExecuteRootSelectionSet()} must cease immediately that the first
1001+ _ execution error_ is raised. That error must be added to the {"errors"} list,
1002+ and {"data"} must be {null}.
1003+
1004+ Note: For subscription operations, processing of the current event is ceased,
1005+ but the subscription still remains in place and future events will be processed
1006+ as normal.
0 commit comments