apollo-link-state

  • Version 0.4.2
  • Published
  • 96.8 kB
  • 2 dependencies
  • MIT license

Install

npm i apollo-link-state
yarn add apollo-link-state
pnpm add apollo-link-state

Overview

An easy way to manage local state with Apollo Link

Index

Functions

function withClientState

withClientState: (clientStateConfig?: ClientStateConfig) => {
writeDefaults(): void;
request(
operation: Operation,
forward?: NextLink
): Observable<FetchResult<Record<string, any>, Record<string, any>>>;
split(test: (op: Operation) => boolean, left: any, right?: any): ApolloLink;
concat(next: any): ApolloLink;
};

    Type Aliases

    type ClientStateConfig

    type ClientStateConfig = {
    cache?: ApolloCache<any>;
    resolvers: any | (() => any);
    defaults?: any;
    typeDefs?: string | string[] | DocumentNode | DocumentNode[];
    fragmentMatcher?: FragmentMatcher;
    };

      Package Files (1)

      Dependencies (2)

      Dev Dependencies (23)

      Peer Dependencies (1)

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/apollo-link-state.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/apollo-link-state)
      • HTML
        <a href="https://www.jsdocs.io/package/apollo-link-state"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>