GraphQLResponse
CLASS
GraphQLResponse
Swift
1public final class GraphQLResponse<Data: GraphQLSelectionSet>Represents a GraphQL response received from a server.
Properties
body
Swift
1public let body: JSONObjectMethods
init(operation:body:)
Swift
1public init<Operation: GraphQLOperation>(operation: Operation, body: JSONObject) where Operation.Data == DataparseResult(cacheKeyForObject:)
Swift
1public 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
CacheKeyForObjectReturns: A
GraphQLResultand aRecordSet.
Parameters
| Name | Description |
|---|---|
| cacheKeyForObject | See CacheKeyForObject |
parseErrorsOnlyFast()
Swift
1public func parseErrorsOnlyFast() -> [GraphQLError]?parseResultFast()
Swift
1public func parseResultFast() throws -> GraphQLResult<Data>