apollo-link-core

  • Version 0.5.4
  • Published
  • 3 dependencies
  • MIT license

Install

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

Overview

Flexible, lightweight transport layer for GraphQL

Index

Functions

function execute

execute: (link: ApolloLink, operation: GraphQLRequest) => Observable<any>;

    function makePromise

    makePromise: <R>(observable: Observable<R>) => Promise<R>;

      Classes

      abstract class ApolloLink {}

        method concat

        concat: (next: ApolloLink | RequestHandler) => ApolloLink;

          method empty

          static empty: () => ApolloLink;

            method from

            static from: (links: (ApolloLink | RequestHandler)[]) => ApolloLink;

              method passthrough

              static passthrough: () => ApolloLink;

                method request

                abstract request: (
                operation: Operation,
                forward?: NextLink
                ) => Observable<FetchResult> | null;

                  method split

                  static split: (
                  test: (op: Operation) => boolean,
                  left: ApolloLink | RequestHandler,
                  right?: ApolloLink | RequestHandler
                  ) => ApolloLink;

                    Interfaces

                    interface GraphQLRequest

                    interface GraphQLRequest {}

                      property context

                      context?: Record<string, any>;

                        property query

                        query?: string | DocumentNode;

                          property variables

                          variables?: Record<string, any>;

                            interface Operation

                            interface Operation {}

                              property context

                              context?: Record<string, any>;

                                property operationName

                                operationName?: string;

                                  property query

                                  query: DocumentNode;

                                    property variables

                                    variables?: Record<string, any>;

                                      Type Aliases

                                      type FetchResult

                                      type FetchResult<
                                      C = Record<string, any>,
                                      E = Record<string, any>
                                      > = ExecutionResult & {
                                      extensions?: E;
                                      context?: C;
                                      };
                                        type NextLink = (operation: Operation) => Observable<FetchResult>;

                                          type RequestHandler

                                          type RequestHandler = (
                                          operation: Operation,
                                          forward?: NextLink
                                          ) => Observable<FetchResult> | null;

                                            Package Files (4)

                                            Dependencies (3)

                                            Dev Dependencies (17)

                                            Peer Dependencies (0)

                                            No peer dependencies.

                                            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-core.

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