Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OfflineLink

Apollo link implementation used to queue graphql requests.

Link will push every incoming operation to queue. All operations that are ready (i.e. they don't use client generated ID) are forwarded to next link when:

  • client goes online
  • there is a new operation and client is online
  • operation was completed (which could result in ID updates, i.e. new operations ready to be forwarded - see OfflineQueue class)

Hierarchy

  • ApolloLink
    • OfflineLink

Index

Constructors

constructor

Properties

Static empty

empty: empty

Static execute

execute: execute

Static from

from: from

Static split

split: split

Methods

concat

  • concat(next: ApolloLink | RequestHandler): ApolloLink
  • Parameters

    • next: ApolloLink | RequestHandler

    Returns ApolloLink

forwardOfflineOperations

  • forwardOfflineOperations(): Promise<void>

initOnlineState

  • initOnlineState(): Promise<void>

request

  • request(operation: Operation, forward: NextLink): Observable<Object>
  • Parameters

    • operation: Operation
    • forward: NextLink

    Returns Observable<Object>

setup

split

  • split(test: function, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink
  • Parameters

    • test: function
        • (op: Operation): boolean
        • Parameters

          • op: Operation

          Returns boolean

    • left: ApolloLink | RequestHandler
    • Optional right: ApolloLink | RequestHandler

    Returns ApolloLink

Generated using TypeDoc