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 targeted 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
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.
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
.
To start, begin by reading the getting started guide.
If you are interested in implementing your own links, read the implementation information.
Your feedback and contributions are welcome.
apollo-link
strives to follow the Apollo design principles:
- Incrementally adoptable
- Universally compatible
- Simple to get started with
- Inspectable and understandable
- Built for interactive apps
- Small and flexible
- Community driven