Skip to content

Commit

Permalink
Merge branch 'main' into release-3.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Apr 29, 2021
2 parents 4420c49 + 9eabf21 commit b43a60c
Show file tree
Hide file tree
Showing 31 changed files with 8,686 additions and 5,706 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@
### Documentation
TBD

## Apollo Client 3.3.16

### Bug fixes
- Prevent `undefined` mutation result in useMutation <br/>
[@jcreighton](https://github.com/jcreighton) in [#8018](https://github.com/apollographql/apollo-client/pull/8018)

- Fix `useReactiveVar` not rerendering for successive synchronous calls. <br/>
[@brainkim](https://github.com/brainkim) in [#8022](https://github.com/apollographql/apollo-client/pull/8022)

## Apollo Client 3.3.15

- Increment `queryInfo.lastRequestId` only when making a network request through the `ApolloLink` chain, rather than every time `fetchQueryByPolicy` is called. <br/>
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,15 @@ The Apollo Client API reference can be found at: <br/>
- [@benjamn](https://github.com/benjamn) (Apollo)
- [@hwillson](https://github.com/hwillson) (Apollo)
- [@jcreighton](https://github.com/jcreighton) (Apollo)
- [@brainkim](https://github.com/brainkim) (Apollo)

## Who is Apollo?

[Apollo Graph, Inc.](https://apollographql.com/) creates industry-leading tools for building applications with GraphQL:

- [Apollo Client](https://www.apollographql.com/apollo-client/) – The most popular GraphQL client for the web. Apollo also builds and maintains [Apollo iOS](https://github.com/apollographql/apollo-ios) and [Apollo Android](https://github.com/apollographql/apollo-android).
- [Apollo Server](https://www.apollographql.com/docs/apollo-server/) – Build a production-ready JavaScript GraphQL server with a schema-first approach.
- [Apollo Studio](https://www.apollographql.com/studio/develop/) – A turnkey portal for GraphQL developers, featuring a powerful GraphQL IDE (the [Apollo Explorer](https://www.apollographql.com/docs/studio/explorer/)), metrics reporting, schema search, and documentation.
- [Apollo Federation](https://www.apollographql.com/apollo-federation) – Create and manage a single data graph composed of subgraphs that can be developed independently.

We are fully committed to advancing the frontier of graph development with open-source libraries, hosted software tooling, developer extensions, and community contributions.
28 changes: 28 additions & 0 deletions docs/shared/link-chain.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
```js:title=index.js
import { ApolloClient, InMemoryCache, HttpLink, from } from "@apollo/client";
import { onError } from "@apollo/client/link/error";

const httpLink = new HttpLink({
uri: "http://localhost:4000/graphql"
});

const errorLink = onError(({ graphQLErrors, networkError }) => {
if (graphQLErrors)
graphQLErrors.forEach(({ message, locations, path }) =>
console.log(
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,
),
);

if (networkError) console.log(`[Network error]: ${networkError}`);
});

// If you provide a link chain to ApolloClient, you
// don't provide the `uri` option.
const client = new ApolloClient({
// The `from` function combines an array of individual links
// into a link chain
link: from([errorLink, httpLink]),
cache: new InMemoryCache()
});
```
Loading

0 comments on commit b43a60c

Please sign in to comment.