A result for an
Operation carrying a full GraphQL response.
Unlike ExecutionResult, an
OperationResult will never be an incremental result and will
always match the fully merged type of a GraphQL request. It essentially is a postprocessed version
of a GraphQL API response.
The result of the execution of the GraphQL operation.
https://spec.graphql.org/October2021/#sec-Data for the GraphQL Data Response spec
Contains a description of errors raised by GraphQL fields or the request itself by the API.
error of an
OperationResult is set to a CombinedError if the GraphQL API response
contained any GraphQL errors.
GraphQL errors occur when either a GraphQL request was prevented from executing entirely
(at which point
data: undefined is set) or when one or more fields of a GraphQL request
failed to execute. Due to the latter, you may receive partial data when a GraphQL request
Additional metadata that a GraphQL API may choose to send that is out of spec.
https://spec.graphql.org/October2021/#sel-EAPHJCAACCoGu9J for the GraphQL Response spec
Indicates that the GraphQL response is streamed and updated results will follow.
Due to incremental delivery, an API may deliver multiple ExecutionResult | ExecutionResults for a
single GraphQL request. This can happen for
@live queries, which allow an API
to update an initial GraphQL response over time, like a subscription.
For GraphQL subscriptions, this flag will always be set to
Operation which this
OperationResult is for.
operation property is set to the Operation that this result is. At the time the
OperationResult is constructed (either from the cache or an API response) the original
Operation that the exchange delivering this result has received will be added.
Indicates that an
OperationResult is not fresh and a new result will follow.
stale flag indicates whether a result is expected to be superseded by a new result soon.
This flag is set whenever a new result is being awaited and will be deliverd as soon as the API responds.
It may be set by the Client when the
Operation was already active, at which point
the Client asks the Exchanges to request a new API response, or
by cache exchanges when a temporary, incomplete, or initial cache result has been deliverd, and
a new API request has been started in the background. (For partial cache results)
Most commonly, this flag is set for a cached result when the operation is executed using the
Generated using TypeDoc