/
Launch Apollo Studio


CLASS

GraphQLResponse

public final class GraphQLResponse<Data: GraphQLSelectionSet>: Parseable

Represents a GraphQL response received from a server.

Properties

body

public let body: JSONObject

Methods

init(from:decoder:)

public init<T>(from data: Foundation.Data, decoder: T) throws where T : FlexibleDecoder

Parameters

NameDescription
dataThe data to decode
decoderThe decoder to use to decode it

init(operation:body:)

public init<Operation: GraphQLOperation>(operation: Operation, body: JSONObject) where Operation.Data == Data

parseResultWithCompletion(cacheKeyForObject:completion:)

public func parseResultWithCompletion(cacheKeyForObject: CacheKeyForObject? = nil,
                                      completion: (Result<(GraphQLResult<Data>, RecordSet?), Error>) -> Void)

parseErrorsOnlyFast()

public func parseErrorsOnlyFast() -> [GraphQLError]?

parseResultFast()

public func parseResultFast() throws -> GraphQLResult<Data>
Edit on GitHub