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

Commit

Permalink
Move walkTree export to react-apollo/walkTree, to avoid bundling it.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Dec 14, 2018
1 parent 6e92599 commit 00fa9be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@

### Improvements

- The `walkTree` function has been deprecated, since there's no way to
make its behavior consistent with the latest versions of React. To save
bundle size, `walkTree` is no longer exported from `react-apollo`,
though you can still access it as follows:
```js
import { walkTree } from "react-apollo/walkTree"
```

## 2.3.3

### Bug Fixes
Expand Down
3 changes: 3 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export default [
// for test-links
umd("lib/test-links.js",
"lib/test-links.js"),
// Enable `import { walkTree } from "react-apollo/walkTree"`
umd("lib/walkTree.js",
"lib/walkTree.js"),
// for filesize
{
input: 'lib/react-apollo.browser.umd.js',
Expand Down
2 changes: 0 additions & 2 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ export * from './withApollo';

export * from './types';

export * from './walkTree';

export { compose } from './utils/flowRight';
2 changes: 1 addition & 1 deletion test/client/getDataFromTree.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
graphql,
Query,
ApolloProvider,
walkTree,
getDataFromTree,
getMarkupFromTree,
DataValue,
ChildProps,
} from '../../src';
import { walkTree } from "../../src/walkTree";
import gql from 'graphql-tag';
const times = require('lodash.times');
import { InMemoryCache as Cache } from 'apollo-cache-inmemory';
Expand Down

0 comments on commit 00fa9be

Please sign in to comment.