Type Aliases

The following type aliases are available globally.

  • An optional closure which gets executed before making the network call, should be used to make local cache update

    Declaration

    Swift

    public typealias OptimisticResponseBlock = (ApolloStore.ReadWriteTransaction?) -> Void
  • Undocumented

    Declaration

    Swift

    public typealias OperationResultHandler<Operation> = (_ result: GraphQLResult<Operation.Data>?, _ error: Error?) -> Void
  • The callback that gets called when there’s a data update(err=nil), or there’s an error during data update(err!=nil)

    Declaration

    Swift

    public typealias DataSourceUpdateHandler = (_ err: Error?) -> Void
  • The callback to extract the object in operation result

    Declaration

    Swift

    public typealias ObjectDataSourceMapper<Operation, Data> = (_ data: Operation.Data) -> Data?
  • The callback to extract the array in operation result

    Declaration

    Swift

    public typealias ArrayDataSourceMapper<Operation, Data> = (_ data: Operation.Data) -> [Data?]?
  • The callback to check whether two elements in the array has the same key

    Declaration

    Swift

    public typealias ArrayDataKeyEqualChecker<Data> = (_ object1: Data?, _ object2: Data?) -> Bool