Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Apollo Client 2.6 integration work #3031

Merged
merged 7 commits into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Change log

## vNext

### Improvements

- Both the `Query` component and `graphql` HOC now accept a
`returnPartialData` prop. This is an important new feature, that should
help address a lot of open Apollo Client / React Apollo issues, so we'll
explain it here with an example. Before this release, if you run a query
that looks like:

```js
const GET_MEMBER = gql`
query GetMember($id: ID!) {
member(id: $id) {
id
name
}
}
`;
```

in one component, the results are cached, then you run a superset query like
the following in another component:

```js
const GET_MEMBER_WITH_PLANS = gql`
query GetMemberWithPlans($id: ID!) {
member(id: $id) {
id
name
plans {
id
title
duration
}
}
}
`;
```

Apollo Client will not re-use the partial data that was cached from the first
query, when it preps and displays the second component. It can't find a
cache hit for the full second query, so it fires the full query over the
network.

With this release, if you set a `returnPartialData` prop to `true` on the
second component, the `data` available to that component will be
automatically pre-loaded with the parts of the query that can be found in the
cache, before the full query is fired over the network. This means you can
do things like showing partial data in your components, while the rest of the
data is being loaded over the network.


## 2.5.5 (2019-04-22)

### Improvements
Expand Down
Loading