Docs
Launch GraphOS Studio
You're viewing documentation for a previous version of this software. Switch to the latest stable version.


CLASS

HTTPResponse

public class HTTPResponse<Operation: GraphQLOperation>

Data about a response received by an HTTP request.

Properties

httpResponse

public var httpResponse: HTTPURLResponse

The HTTPURLResponse received from the URL loading system

rawData

public var rawData: Data

The raw data received from the URL loading system

parsedResponse

public var parsedResponse: GraphQLResult<Operation.Data>?

[optional] The data as parsed into a GraphQLResult, which can eventually be returned to the UI. Will be nil if not yet parsed.

legacyResponse

public var legacyResponse: GraphQLResponse<Operation.Data>? = nil

[optional] The data as parsed into a GraphQLResponse for legacy caching purposes. If you're not using the JSONResponseParsingInterceptor, you probably shouldn't be using this property. NOTE: This property will be removed when the transition to the Swift Codegen is complete.

Methods

init(response:rawData:parsedResponse:)

public init(response: HTTPURLResponse,
rawData: Data,
parsedResponse: GraphQLResult<Operation.Data>?)

Designated initializer

  • Parameters:
    • response: The HTTPURLResponse received from the server.
    • rawData: The raw, unparsed data received from the server.
    • parsedResponse: [optional] The response parsed into the ParsedValue type. Will be nil if not yet parsed, or if parsing failed.

Parameters

NameDescription
responseThe HTTPURLResponse received from the server.
rawDataThe raw, unparsed data received from the server.
parsedResponse[optional] The response parsed into the ParsedValue type. Will be nil if not yet parsed, or if parsing failed.
Next
Introduction
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company