🔗 Interface for fetching and modifying control flow of GraphQL requests
Switch branches/tags
zen-observable-ts@0.8.10 zen-observable-ts@0.8.9 zen-observable-ts@0.8.8 zen-observable-ts@0.8.7 zen-observable-ts@0.8.6 zen-observable-ts@0.5.0 zen-observable-ts@0.4.4 zen-observable-ts@0.4.3-beta.4 zen-observable-ts@0.4.3-beta.2 zen-observable-ts@0.4.3-beta.0 zen-observable-ts@0.4.2 zen-observable-ts@0.4.0 zen-observable-ts@0.3.0 zen-observable-ts@0.1.0 v0.0.3 v0.0.2 v0.0.1 apollo-link@1.2.3 apollo-link@1.2.2 apollo-link@1.2.1 apollo-link@1.2.0 apollo-link@1.1.0 apollo-link@1.0.7 apollo-link@1.0.6 apollo-link@1.0.4 apollo-link@1.0.3 apollo-link@1.0.0 apollo-link@0.8.0 apollo-link@0.7.0 apollo-link@0.6.1-beta.6 apollo-link@0.6.1-beta.5 apollo-link@0.6.1-beta.3 apollo-link@0.6.1-beta.1 apollo-link@0.6.1-beta.0 apollo-link@0.5.4 apollo-link@0.5.2 apollo-link@0.5.0 apollo-link@0.4.1 apollo-link@0.4.0 apollo-link@0.3.1 apollo-link@0.2.0 apollo-link@0.1.1 apollo-link@0.1.0 apollo-link@0.0.3 apollo-link-ws@1.0.9 apollo-link-ws@1.0.8 apollo-link-ws@1.0.7 apollo-link-ws@1.0.6 apollo-link-ws@1.0.5 apollo-link-ws@1.0.4 apollo-link-ws@1.0.3 apollo-link-ws@1.0.2 apollo-link-ws@1.0.1 apollo-link-ws@1.0.0 apollo-link-ws@0.6.0 apollo-link-ws@0.5.0 apollo-link-ws@0.4.1-beta.6 apollo-link-ws@0.4.1-beta.5 apollo-link-ws@0.4.1-beta.3 apollo-link-ws@0.4.1-beta.1 apollo-link-ws@0.4.1-beta.0 apollo-link-ws@0.3.4 apollo-link-ws@0.3.2 apollo-link-ws@0.3.0 apollo-link-ws@0.2.1 apollo-link-ws@0.2.0 apollo-link-ws@0.1.1 apollo-link-ws@0.1.0 apollo-link-set-context@0.6.1-beta.1 apollo-link-set-context@0.6.1-beta.0 apollo-link-set-context@0.5.4 apollo-link-set-context@0.5.2 apollo-link-set-context@0.5.0 apollo-link-set-context@0.4.1 apollo-link-set-context@0.4.0 apollo-link-set-context@0.3.1 apollo-link-set-context@0.3.0 apollo-link-set-context@0.2.0 apollo-link-set-context@0.1.0 apollo-link-set-context@0.0.1 apollo-link-schema@1.1.1 apollo-link-schema@1.1.0 apollo-link-schema@1.0.6 apollo-link-schema@1.0.5 apollo-link-schema@1.0.4 apollo-link-schema@1.0.3 apollo-link-schema@1.0.2 apollo-link-schema@1.0.1 apollo-link-retry@2.2.5 apollo-link-retry@2.2.4 apollo-link-retry@2.2.3 apollo-link-retry@2.2.2 apollo-link-retry@2.2.0 apollo-link-retry@2.1.3 apollo-link-retry@2.1.2 apollo-link-retry@2.1.1 apollo-link-retry@2.0.0 apollo-link-retry@1.0.2 apollo-link-retry@1.0.1 apollo-link-retry@1.0.0
Nothing to show
Clone or download
Failed to load latest commit information.
.circleci Revert "add broken link check and fix broken links (#597)" (#653) Jun 19, 2018
.github [apollo-bot] Update the Templates with docs label (#546) Mar 14, 2018
.vscode update the tasks to include lerna Jul 28, 2017
docs chore(deps): update dependency hexo-server to v0.3.3 Aug 26, 2018
images reorganized specification as documentation Jul 19, 2017
packages chore(deps): update dependency rollup to v0.66.6 Oct 11, 2018
.gitignore moved checkFetcher in http links to after option setting and use Map … Feb 16, 2018
.npmignore Initial commit with first test and travis-ci Jun 7, 2017
LICENSE Create LICENSE Jun 8, 2017
README.md Update README.md Feb 5, 2018
appveyor.yml bring repo to pairity with apollo-client and remove soon to be dead p… Oct 2, 2017
codecov.yml bring repo to pairity with apollo-client and remove soon to be dead p… Oct 2, 2017
dangerfile.ts Update Dangerjs script and templates (#532) Mar 2, 2018
lerna.json remove apollo-link for the core package and set peerDeps instead of d… Sep 13, 2017
package.json chore(deps): update dependency rollup to v0.66.6 Oct 11, 2018
renovate.json Adjust renovate assignee list Oct 1, 2018
rollup.config.js Change apollo-link-http-common rollup target to apolloLink.httpCommon Feb 27, 2018
tsconfig.json Keep JSDoc Comments in TypeScript output! (#575) Mar 27, 2018
tslint.json bring repo to pairity with apollo-client and remove soon to be dead p… Oct 2, 2017


apollo-link npm version Get on Slack

apollo-link is a standard interface for modifying control flow of GraphQL requests and fetching GraphQL results, designed to provide a simple GraphQL client that is capable of extensions. The high level use cases of apollo-link are highlighted below:

  • fetch queries directly without normalized cache
  • network interface for Apollo Client
  • network interface for Relay Modern
  • fetcher for GraphiQL

The apollo link interface is designed to make links composable and easy to share, each with a single purpose. In addition to the core, this repository contains links for the most common fetch methods—http, local schema, websocket—and common control flow manipulations, such as retrying and polling. For a more detailed view of extended use cases, please see this list of community created links.


npm install apollo-link --save

To use apollo-link in a web browser or mobile app, you'll need a build system capable of loading NPM packages on the client. Some common choices include Browserify, Webpack, and Meteor +1.3.


To start, begin by reading this introduction. For a deeper understanding and to fully leverage the power of Apollo Links, please view the concepts overview. To see example links from around the community, check out this list. If you would like your link to be featured, please open a pull request.


Apollo Link uses Lerna to manage multiple packages. To get started contributing, run npm run bootstrap in the root of the repository, which will install all dependencies and connect the dependent projects with symlinks in node_modules. Then run npm run build to compile the typescript source. Finally for incremental compilation, use npm run watch.

Your feedback and contributions are always welcome.

Apollo Principles

apollo-link strives to follow the Apollo design principles:

  1. Incrementally adoptable
  2. Universally compatible
  3. Simple to get started with
  4. Inspectable and understandable
  5. Built for interactive apps
  6. Small and flexible
  7. Community driven