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


CLASS

GraphQLResponse

public final class GraphQLResponse<Data: GraphQLSelectionSet>

Represents a response received from a server.

Properties

body

public let body: JSONObject

Methods

init(operation:body:)

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

parseResult(cacheKeyForObject:)

public func parseResult(cacheKeyForObject: CacheKeyForObject? = nil) throws -> (GraphQLResult<Data>, RecordSet?)

Parses a response into a GraphQLResult and a RecordSet. The result can be sent to a completion block for a request. The RecordSet can be merged into a local cache.

  • Parameter cacheKeyForObject: See CacheKeyForObject
  • Returns: A GraphQLResult and a RecordSet.

Parameters

NameDescription
cacheKeyForObjectSee CacheKeyForObject

parseErrorsOnlyFast()

public func parseErrorsOnlyFast() -> [GraphQLError]?

parseResultFast()

public func parseResultFast() throws -> GraphQLResult<Data>
Next
Introduction
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company