Options
All
  • Public
  • Public/Protected
  • All
Menu

Type Parameters

  • TSerialized

Hierarchy

  • ApolloCache

Implements

Index

Constructors

  • new ApolloCache<TSerialized>(): ApolloCache<TSerialized>
  • Type Parameters

    • TSerialized

    Returns ApolloCache<TSerialized>

Properties

getFragmentDoc: any

Methods

  • Type Parameters

    • U

    Parameters

    Returns U

  • Type Parameters

    • T

    Parameters

    Returns DiffResult<T>

  • Parameters

    Returns boolean

  • extract(optimistic?: boolean): TSerialized
  • Parameters

    • Optional optimistic: boolean

    Returns TSerialized

  • gc(): string[]
  • Returns string[]

  • Parameters

    Returns undefined | string

  • Parameters

    Returns boolean

  • performTransaction(transaction: Transaction<TSerialized>, optimisticId?: null | string): void
  • Parameters

    • transaction: Transaction<TSerialized>
    • Optional optimisticId: null | string

    Returns void

  • read<TData, TVariables>(query: ReadOptions<TVariables, TData>): null | TData
  • Type Parameters

    • TData = any

    • TVariables = any

    Parameters

    Returns null | TData

  • readFragment<FragmentType, TVariables>(options: ReadFragmentOptions<FragmentType, TVariables>, optimistic?: boolean): null | FragmentType
  • Type Parameters

    • FragmentType

    • TVariables = any

    Parameters

    Returns null | FragmentType

  • readQuery<QueryType, TVariables>(options: ReadQueryOptions<QueryType, TVariables>, optimistic?: boolean): null | QueryType
  • Type Parameters

    • QueryType

    • TVariables = any

    Parameters

    Returns null | QueryType

  • recordOptimisticTransaction(transaction: Transaction<TSerialized>, optimisticId: string): void
  • Parameters

    • transaction: Transaction<TSerialized>
    • optimisticId: string

    Returns void

  • removeOptimistic(id: string): void
  • Parameters

    • id: string

    Returns void

  • restore(serializedState: TSerialized): ApolloCache<TSerialized>
  • Parameters

    • serializedState: TSerialized

    Returns ApolloCache<TSerialized>

  • updateFragment<TData, TVariables>(options: UpdateFragmentOptions<TData, TVariables>, update: ((data: null | TData) => null | void | TData)): null | TData
  • Type Parameters

    • TData = any

    • TVariables = any

    Parameters

    • options: UpdateFragmentOptions<TData, TVariables>
    • update: ((data: null | TData) => null | void | TData)
        • (data: null | TData): null | void | TData
        • Parameters

          • data: null | TData

          Returns null | void | TData

    Returns null | TData

  • updateQuery<TData, TVariables>(options: UpdateQueryOptions<TData, TVariables>, update: ((data: null | TData) => null | void | TData)): null | TData
  • Type Parameters

    • TData = any

    • TVariables = any

    Parameters

    • options: UpdateQueryOptions<TData, TVariables>
    • update: ((data: null | TData) => null | void | TData)
        • (data: null | TData): null | void | TData
        • Parameters

          • data: null | TData

          Returns null | void | TData

    Returns null | TData

  • watch<TData, TVariables>(watch: WatchOptions<TData, TVariables>): (() => void)
  • Type Parameters

    • TData = any

    • TVariables = any

    Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • write<TData, TVariables>(write: WriteOptions<TData, TVariables>): undefined | Reference
  • Type Parameters

    • TData = any

    • TVariables = any

    Parameters

    • write: WriteOptions<TData, TVariables>

    Returns undefined | Reference

  • Type Parameters

    • TData = any

    • TVariables = any

    Parameters

    Returns undefined | Reference

Generated using TypeDoc