Update GraphQLResponse.swift - #3640
Closed
bobbysothebys wants to merge 1 commit into
Closed
Conversation
/// An error representing an invalid or unusable ``GraphQLResponse``.
///
/// This error is thrown by convenience APIs such as ``GraphQLResponse/dataOrThrow()`` when the
/// response does not contain usable `data`.
///
/// A response may fail for one of two reasons:
/// - ``graphQLErrors(_:)``: The server returned one or more GraphQL errors and no data was
/// available to return.
/// - ``missingData``: The response contained neither `data` nor GraphQL errors.
///
/// This error only describes invalid GraphQL response state. Transport-level failures, request
/// execution failures, and other networking errors are surfaced separately by the network transport
/// and request chain APIs.
public enum Error: Swift.Error, Sendable {
/// The response included one or more GraphQL errors and did not contain usable data.
case graphQLErrors([GraphQLError])
/// The response contained neither data nor GraphQL errors.
case missingData
}
Similar to Kotlins dataOrThrow or dataAssertNoErrors
✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
Contributor
|
We do not accept PRs directly to the 'apollo-ios' repo. All development is done through the 'apollo-ios-dev' repo, please see the CONTRIBUTING guide for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/// An error representing an invalid or unusable
GraphQLResponse. ////// This error is thrown by convenience APIs such as
GraphQLResponse/dataOrThrow()when the /// response does not contain usabledata.///
/// A response may fail for one of two reasons:
/// -
graphQLErrors(_:): The server returned one or more GraphQL errors and no data was/// available to return.
/// -
missingData: The response contained neitherdatanor GraphQL errors.///
/// This error only describes invalid GraphQL response state. Transport-level failures, request
/// execution failures, and other networking errors are surfaced separately by the network transport
/// and request chain APIs.
public enum Error: Swift.Error, Sendable {
/// The response included one or more GraphQL errors and did not contain usable data.
case graphQLErrors([GraphQLError])
/// The response contained neither data nor GraphQL errors.
case missingData
}
Similar to Kotlins dataOrThrow or dataAssertNoErrors