Skip to content

Commit

Permalink
fix examples in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baxley committed Sep 13, 2017
1 parent 9b0a587 commit a4e554f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**The master branch is the beta version of Apollo Client 2.0, to find the current @latest, take a look at the `latest` branch. For update information, check out the [upgrade guide](Upgrade.md)**

**The documentation site still references the 1.0 API until we are out of beta for the 2.0**

Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, etc. It allows you to easily build UI components that fetch data via GraphQL. To get the most value out of `apollo-client` you should use it with one of its view layer integrations.

To get started with the React integration go to our [**React Apollo documentation website**](http://dev.apollodata.com/react/).
Expand Down Expand Up @@ -32,14 +34,14 @@ To use this client in a web browser or mobile app, you'll need a build system ca

## Usage

If you know you want to use the core `apollo-client` package you can get started by constructing an instance of the core class [`ApolloClient`][] with a network interface created by network interface you may call the [`createNetworkInterface`][] function like so:
If you know you want to use the core `apollo-client` package you can get started by constructing an instance of the core class [`ApolloClient`][] with a link created by HttpLink you may creaete a new [`HttpLink`][] instance like so:

```js
import ApolloClient, { createNetworkInterface } from 'apollo-client';
import ApolloClient, { HttpLink } from 'apollo-client-preset';
import gql from 'graphql-tag';

const client = new ApolloClient({
networkInterface: createNetworkInterface({
link: new HttpLink({
uri: 'https://graphql.example.com',
}),
});
Expand Down

0 comments on commit a4e554f

Please sign in to comment.