Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apollographql/apollo-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: apollo-cache@1.3.2
Choose a base ref
...
head repository: apollographql/apollo-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: apollo-cache@1.3.4
Choose a head ref

Commits on Jun 6, 2019

  1. Copy the full SHA
    34da93b View commit details
  2. Escape lt/gt tags in the docs (#4935)

    * Upgrade theme and escape lt/gt symbols
    
    * Go back to 1.0.2
    
    * Use old lockfile
    trevorblades authored Jun 6, 2019
    Copy the full SHA
    3bfa05a View commit details

Commits on Jun 7, 2019

  1. Copy the full SHA
    e7c078d View commit details
  2. Copy the full SHA
    fdaf888 View commit details
  3. Copy the full SHA
    711d84c View commit details

Commits on Jun 8, 2019

  1. Copy the full SHA
    547d9f5 View commit details

Commits on Jun 10, 2019

  1. Copy the full SHA
    d74e148 View commit details
  2. Copy the full SHA
    d37bdb0 View commit details

Commits on Jun 11, 2019

  1. Copy the full SHA
    64aa25a View commit details
  2. Changelog update

    hwillson committed Jun 11, 2019
    Copy the full SHA
    98b1469 View commit details
  3. Merge pull request #4940 from apollographql/watson-docs-update

    Update queries.md
    hwillson authored Jun 11, 2019
    Copy the full SHA
    6283594 View commit details
  4. Copy the full SHA
    7c65a87 View commit details

Commits on Jun 13, 2019

  1. Copy the full SHA
    b022ea3 View commit details

Commits on Jun 14, 2019

  1. Copy the full SHA
    49c55d1 View commit details
  2. Copy the full SHA
    95e5842 View commit details
  3. Copy the full SHA
    e6f96f3 View commit details
  4. Copy the full SHA
    caf9a28 View commit details
  5. Copy the full SHA
    51941ac View commit details
  6. Copy the full SHA
    0bcf8cd View commit details
  7. Copy the full SHA
    9e6719e View commit details
  8. Copy the full SHA
    5c3c02f View commit details
  9. Copy the full SHA
    f902d29 View commit details

Commits on Jun 15, 2019

  1. Copy the full SHA
    7be7b38 View commit details
  2. Add returnPartialData to the API docs

    Fix spacing
    hwillson committed Jun 15, 2019
    Copy the full SHA
    b4d23ae View commit details
  3. Merge pull request #4969 from apollographql/hwillson/return-partial-data

    Add `returnPartialData` to the API docs
    hwillson authored Jun 15, 2019
    Copy the full SHA
    a0e14f3 View commit details

Commits on Jun 17, 2019

  1. Reset query store errors via ObservableQuery.resetQueryStoreErrors (#…

    …4941)
    
    * Reset query store errors via `ObservableQuery.resetQueryStoreErrors`
    
    React Apollo relies on the `ObervableQuery->getCurrentResult`
    method to retrieve query results to show within its components.
    When an error occurs while fetching results, that error is stored
    in the query store that each `ObservableQuery` instance is
    configured to use. Unfortunately, `getCurrentResult` will only
    retrieve subsequent results if no error exists in the query store.
    `ObservableQuery` doesn't currently provide a way to clear out
    query store errors, which means when React Apollo originating
    requests that cause an error occur, the error is stored, and
    future valid requests can no longer be processed.
    
    This commit adds a `resetQueryStoreErrors` method to the
    `ObservableQuery` public API, that will allow React Apollo (and
    other consumers) to be able to clear out query store errors.
    
    Related to: apollographql/react-apollo#3090
    
    * Changelog update
    
    * Remove unnecessary expect
    hwillson authored Jun 17, 2019
    Copy the full SHA
    93bda88 View commit details

Commits on Jun 18, 2019

  1. Copy the full SHA
    11dcd82 View commit details
  2. chore: Publish

     - apollo-boost@0.4.3
     - apollo-client@2.6.3
    hwillson committed Jun 18, 2019
    Copy the full SHA
    eb75e0e View commit details
  3. Adjust versions in changelog

    hwillson committed Jun 18, 2019
    Copy the full SHA
    ec167e9 View commit details

Commits on Jun 21, 2019

  1. The HeuristicFragmentMatcher shouldn't be used with unions/interfac…

    …es (#4994)
    
    Small docs (and source comment) update to make it clear that the
    `HeuristicFragmentMatcher` should not be used with fragments that
    are associated with unions or interfaces. This may change in a
    future major version of Apollo Client, but for now this is the
    recommendation.
    
    Fixes #4918.
    hwillson authored Jun 21, 2019
    Copy the full SHA
    6528a6a View commit details
  2. Copy the full SHA
    e10e192 View commit details
  3. Copy the full SHA
    46aa8bd View commit details
  4. Copy the full SHA
    975dae7 View commit details
  5. Copy the full SHA
    300694a View commit details
  6. Copy the full SHA
    ccad73f View commit details
  7. Copy the full SHA
    2b9a291 View commit details
  8. Copy the full SHA
    f8a4797 View commit details
  9. Copy the full SHA
    fc57c88 View commit details

Commits on Jun 22, 2019

  1. Copy the full SHA
    ec2af54 View commit details
  2. Copy the full SHA
    3c17637 View commit details
  3. Copy the full SHA
    6c67ccf View commit details
  4. Copy the full SHA
    6632e17 View commit details

Commits on Jun 24, 2019

  1. Copy the full SHA
    280f460 View commit details
  2. Copy the full SHA
    ab3c57a View commit details

Commits on Jun 25, 2019

  1. Copy the full SHA
    6128e99 View commit details
  2. Copy the full SHA
    d3f337e View commit details

Commits on Jun 26, 2019

  1. Copy the full SHA
    ea94327 View commit details
  2. Copy the full SHA
    4727bd7 View commit details
  3. remove old documentation (#5011)

    It appears that this bit had out-of-date information. This update makes it match the current code example.
    devtanc authored and trevorblades committed Jun 26, 2019
    Copy the full SHA
    9a9cf1d View commit details

Commits on Jun 27, 2019

  1. Copy the full SHA
    b8bc997 View commit details
Showing with 24,647 additions and 19,029 deletions.
  1. +1 −0 .github/CODEOWNERS
  2. +1 −1 .vscode/settings.json
  3. +63 −1 CHANGELOG.md
  4. +1 −1 README.md
  5. +86 −0 ROADMAP.md
  6. +1 −0 docs/.nvmrc
  7. +51 −42 docs/gatsby-config.js
  8. +8,814 −3,867 docs/package-lock.json
  9. +8 −5 docs/package.json
  10. +22 −0 docs/shared/apollo-provider.mdx
  11. +13 −0 docs/shared/mutation-options.mdx
  12. +15 −0 docs/shared/mutation-result.mdx
  13. +18 −0 docs/shared/query-options.mdx
  14. +15 −0 docs/shared/query-result.mdx
  15. +8 −0 docs/shared/subscription-options.mdx
  16. +5 −0 docs/shared/subscription-result.mdx
  17. +0 −541 docs/source/advanced/update-store.md
  18. +66 −22 docs/source/api/apollo-client.mdx
  19. +96 −116 docs/source/api/react-apollo.md
  20. +35 −0 docs/source/api/react-common.mdx
  21. +62 −0 docs/source/api/react-components.mdx
  22. +1,089 −0 docs/source/api/react-hoc.mdx
  23. +289 −0 docs/source/api/react-hooks.mdx
  24. +47 −0 docs/source/api/react-ssr.md
  25. +74 −0 docs/source/api/react-testing.md
  26. +136 −0 docs/source/caching/cache-configuration.md
  27. +65 −123 docs/source/{advanced/caching.md → caching/cache-interaction.md}
  28. +35 −0 docs/source/{features/error-handling.md → data/error-handling.mdx}
  29. +4 −4 docs/source/{advanced → data}/fragments.md
  30. +373 −97 docs/source/{essentials/local-state.md → data/local-state.mdx}
  31. +550 −0 docs/source/data/mutations.mdx
  32. +185 −10 docs/source/{features/pagination.md → data/pagination.mdx}
  33. +457 −0 docs/source/data/queries.mdx
  34. +139 −35 docs/source/{advanced/subscriptions.md → data/subscriptions.mdx}
  35. +33 −1 docs/source/{recipes/client-schema-mocking.md → development-testing/client-schema-mocking.mdx}
  36. +10 −8 docs/source/{features → development-testing}/developer-tooling.md
  37. +204 −6 docs/source/{recipes → development-testing}/static-typing.md
  38. +168 −28 docs/source/{recipes/testing.md → development-testing/testing.mdx}
  39. +0 −180 docs/source/essentials/get-started.md
  40. +0 −290 docs/source/essentials/mutations.md
  41. +0 −314 docs/source/essentials/queries.md
  42. +217 −0 docs/source/get-started.mdx
  43. +29 −27 docs/source/index.mdx
  44. +4 −0 docs/source/{ → integrations}/integrations.md
  45. +1 −1 docs/source/{recipes → integrations}/meteor.md
  46. +3 −3 docs/source/{recipes → integrations}/react-native.md
  47. +1 −1 docs/source/{recipes → integrations}/webpack.md
  48. +2 −2 docs/source/{advanced → migrating}/boost-migration.md
  49. +96 −0 docs/source/migrating/hooks-migration.md
  50. +77 −1 docs/source/{recipes/authentication.md → networking/authentication.mdx}
  51. +1 −1 docs/source/{advanced → networking}/network-layer.md
  52. +1 −1 docs/source/{recipes → performance}/babel.md
  53. +105 −3 docs/source/{features/optimistic-ui.md → performance/optimistic-ui.mdx}
  54. +130 −3 docs/source/{recipes/performance.md → performance/performance.mdx}
  55. +24 −10 docs/source/{features/server-side-rendering.md → performance/server-side-rendering.mdx}
  56. +0 −186 docs/source/react-apollo-migration.md
  57. +0 −418 docs/source/recipes/2.0-migration.md
  58. +0 −246 docs/source/recipes/recompose.md
  59. +0 −231 docs/source/recipes/simple-example.md
  60. +28 −7 docs/source/{why-apollo.md → why-apollo.mdx}
  61. +33 −1 docs/static/_redirects
  62. +9,756 −11,931 package-lock.json
  63. +33 −33 package.json
  64. +2 −0 packages/apollo-boost/.npmignore
  65. +1 −2 packages/apollo-boost/README.md
  66. +225 −96 packages/apollo-boost/package-lock.json
  67. +2 −2 packages/apollo-boost/package.json
  68. +3 −2 packages/apollo-boost/src/index.ts
  69. +104 −9 packages/apollo-cache-inmemory/package-lock.json
  70. +3 −3 packages/apollo-cache-inmemory/package.json
  71. +2 −2 packages/apollo-cache-inmemory/src/__tests__/writeToStore.ts
  72. +7 −9 packages/apollo-cache-inmemory/src/depTrackingCache.ts
  73. +19 −6 packages/apollo-cache-inmemory/src/fragmentMatcher.ts
  74. +15 −6 packages/apollo-cache-inmemory/src/inMemoryCache.ts
  75. +2 −2 packages/apollo-cache-inmemory/src/mapCache.ts
  76. +2 −1 packages/apollo-cache-inmemory/src/objectCache.ts
  77. +18 −15 packages/apollo-cache-inmemory/src/readFromStore.ts
  78. +1 −1 packages/apollo-cache-inmemory/src/types.ts
  79. +1 −1 packages/apollo-cache-inmemory/src/writeToStore.ts
  80. +33 −7 packages/apollo-cache/package-lock.json
  81. +5 −2 packages/apollo-cache/package.json
  82. +0 −28 packages/apollo-client/ROADMAP.md
  83. +78 −5 packages/apollo-client/package-lock.json
  84. +2 −3 packages/apollo-client/package.json
  85. +37 −0 packages/apollo-client/schema.graphql
  86. +1 −0 packages/apollo-client/scripts/deploy.sh
  87. +116 −0 packages/apollo-client/src/__tests__/client.ts
  88. +6 −6 packages/apollo-client/src/core/LocalState.ts
  89. +16 −0 packages/apollo-client/src/core/ObservableQuery.ts
  90. +1 −1 packages/apollo-client/src/core/QueryManager.ts
  91. +62 −0 packages/apollo-client/src/core/__tests__/LocalState.ts
  92. +45 −0 packages/apollo-client/src/core/__tests__/ObservableQuery.ts
  93. +2 −6 packages/apollo-client/src/core/types.ts
  94. +1 −0 packages/apollo-client/src/core/watchQueryOptions.ts
  95. +4 −4 packages/apollo-utilities/package-lock.json
  96. +2 −2 packages/apollo-utilities/package.json
  97. +35 −6 packages/graphql-anywhere/package-lock.json
  98. +5 −2 packages/graphql-anywhere/package.json
  99. +5 −1 packages/graphql-anywhere/src/__tests__/utilities.ts
  100. +4 −1 packages/graphql-anywhere/src/utilities.ts
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/docs/ @stephenbarlow
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -15,5 +15,5 @@
"coverage": true,
"npm": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "../node_modules/typescript/lib"
}
64 changes: 63 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
**Note:** This is a cumulative changelog that outlines all of the Apollo Client project child package changes that were bundled into a specific `apollo-client` release.

## Apollo Client (2.6.2)
## Apollo Client 2.6.5

### Apollo Client (2.6.5)

- Update the `fetchMore` type signature to accept `context`. <br/>
[@koenpunt](https://github.com/koenpunt) in [#5147](https://github.com/apollographql/apollo-client/pull/5147)

- Fix type for `Resolver` and use it in the definition of `Resolvers`. <br />
[@peoplenarthax](https://github.com/peoplenarthax) in [#4943](https://github.com/apollographql/apollo-client/pull/4943)

- Local state resolver functions now receive a `fragmentMap: FragmentMap`
object, in addition to the `field: FieldNode` object, via the `info`
parameter. <br/>
[@mjlyons](https://github.com/mjlyons) in [#5388](https://github.com/apollographql/apollo-client/pull/5388)

- Documentation updates. <br/>
[@tomquirk](https://github.com/tomquirk) in [#5645](https://github.com/apollographql/apollo-client/pull/5645) <br/>
[@Sequoia](https://github.com/Sequoia) in [#5641](https://github.com/apollographql/apollo-client/pull/5641) <br/>
[@phryneas](https://github.com/phryneas) in [#5628](https://github.com/apollographql/apollo-client/pull/5628) <br/>
[@AryanJ-NYC](https://github.com/AryanJ-NYC) in [#5560](https://github.com/apollographql/apollo-client/pull/5560)

### GraphQL Anywhere (4.2.5)

- Fix `filter` edge case involving `null`. <br/>
[@lifeiscontent](https://github.com/lifeiscontent) in [#5110](https://github.com/apollographql/apollo-client/pull/5110)

### Apollo Boost (0.4.5)

- Replace `GlobalFetch` reference with `WindowOrWorkerGlobalScope`. <br/>
[@abdonrd](https://github.com/abdonrd) in [#5373](https://github.com/apollographql/apollo-client/pull/5373)

- Add `assumeImmutableResults` typing to apollo boost `PresetConfig` interface. <br/>
[@bencoullie](https://github.com/bencoullie) in [#5571](https://github.com/apollographql/apollo-client/pull/5571)


## Apollo Client (2.6.4)

### Apollo Client (2.6.4)

- Modify `ObservableQuery` to allow queries with `notifyOnNetworkStatusChange`
to be notified when loading after an error occurs. <br />
[@jasonpaulos](https://github.com/jasonpaulos) in [#4992](https://github.com/apollographql/apollo-client/pull/4992)
- Add `graphql` as a `peerDependency` of `apollo-cache` and
`graphql-anywhere`. <br/>
[@ssalbdivad](https://github.com/ssalbdivad) in [#5081](https://github.com/apollographql/apollo-client/pull/5081)
- Documentation updates. </br>
[@raibima](https://github.com/raibima) in [#5132](https://github.com/apollographql/apollo-client/pull/5132) <br/>
[@hwillson](https://github.com/hwillson) in [#5141](https://github.com/apollographql/apollo-client/pull/5141)


## Apollo Client (2.6.3)

### Apollo Client (2.6.3)

- A new `ObservableQuery.resetQueryStoreErrors()` method is now available that
can be used to clear out `ObservableQuery` query store errors. <br/>
[@hwillson](https://github.com/hwillson) in [#4941](https://github.com/apollographql/apollo-client/pull/4941)
- Documentation updates. <br/>
[@michael-watson](https://github.com/michael-watson) in [#4940](https://github.com/apollographql/apollo-client/pull/4940) <br/>
[@hwillson](https://github.com/hwillson) in [#4969](https://github.com/apollographql/apollo-client/pull/4969)


## Apollo Client (2.6.1)

### Apollo Utilities 1.3.2

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Apollo Client](https://www.apollographql.com/client/) [![npm version](https://badge.fury.io/js/apollo-client.svg)](https://badge.fury.io/js/apollo-client) [![Open Source Helpers](https://www.codetriage.com/apollographql/apollo-client/badges/users.svg)](https://www.codetriage.com/apollographql/apollo-client)
# [Apollo Client](https://www.apollographql.com/client/) [![npm version](https://badge.fury.io/js/apollo-client.svg)](https://badge.fury.io/js/apollo-client) [![Open Source Helpers](https://www.codetriage.com/apollographql/apollo-client/badges/users.svg)](https://www.codetriage.com/apollographql/apollo-client) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)

Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. 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.

86 changes: 86 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Apollo Client Roadmap

## Product vision

Apollo Client is a framework for consuming a data graph and binding it to a user interface. It is written in TypeScript, designed for use with React, and integrates seamlessly with the rest of the Apollo GraphQL platform. Apollo Client is easy to use, thoroughly documented, incrementally adoptable, and scalable to the needs of enterprise-grade applications. Our goal is to make Apollo Client not only the *best way to use GraphQL*, but also the *the best way to manage data for React apps*. Apollo Client ships with a first-class set of developer tools, including a CLI, VS Code extension, and in-browser debugging tools.

## Apollo Client 3.0

**Completion date:** Full RC available end of October 2019

At a high level, the next major version of Apollo Client (roughly referred to as Apollo Client 3) aims to:

* Prune outdated and overlapping API surface areas
* Redesign the core caching layer
* Simplify the product's packaging

### Goals

* Only one package is required to install and use all core Apollo Client features (including React integration and networking).
* This makes documentation easier to understand and helps developers get to their first "feature shipped" without having to learn multiple packages.
* This also helps teams customize their build of Apollo Client for advanced usage.

* The default `@apollo/client` bundle is 60kb minified (but not gzipped) if using no build tools (less if using build tools).
* This is roughly half the size of the current libraries and half the size of `react` + `react-dom`.
* This includes all packages needed for a full, out-of-the-box Apollo Client experience (Apollo Client core with cache and utilities, React hooks integration, and networking). It will be possible to enable/disable features to reduce the overall bundle size.

* While simulating a 4x CPU slowdown in Chrome, Apollo Client fetch-and-cache operations complete in 16ms or less to account for repaint frame rates.
* This is a rough approximation of mid-range mobile devices.

* The new `EntityCache` (name TBD) furthers the ideas started with federation to take advantage of a principled datagraph.
* The `EntityCache` uses entities and keys to know object identity for selective normalization and better performance.
* It works well for server-side rendering and offline apps, including error storage and priority rendering for prefetched work.
* Its configuration can be generated by the CLI but is clear and straightforward enough to be created and edited manually.

* Refreshed and redesigned documentation that helps teams be productive throughout their adoption of Apollo Client.
* Features a new getting-started experience to help React engineers be productive from day one.
* Explains the architecture and cache design more clearly as teams adopt more advanced features.

### How we get there

Apollo Client 3 will be a rewrite-in-place of the Apollo Client project, while we support and maintain Apollo Client 2.x in a reduced manner. Because we are moving to a new package name and structure, we will begin an alpha cycle as soon as the new core is usable by production teams. This will allow us to get concrete performance numbers from real-world usage.

Apollo Client 3 will feature simplified packaging for easier use and smaller bundles, along with a new cache implementation with more control and better performance. The work to accomplish these goals is grouped as follows:

* **Simplified packaging for easier use and smaller bundles:**

* Two packages (down from the current ~15 packages): `@apollo/client` and `@apollo/graphql`
* Separate reduced and focused bundles to allow applications to use only the parts of Apollo Client they want to (e.g. `@apollo/client/core` for just the AC core + cache)
* Further bundle size reductions by pruning `apollo-utilities` and other API cruft needed to support the generic APIs currently supported
* Reduction of mental overhead for teams by providing a single-package, out-of-the-box experience for React. More advanced teams use the same package by building their own version if needed using file imports
* This follows the same pattern that `@apollo/graphql` and `@apollo/server` will use.
* Pruning of the client API to reduce confusion, increase performance, and thin bundle size
* Remove `watchQuery` in favor of a single query method that returns a watchable result stream.
* Remove the custom cache implementation entry point in favor of a simplified config API that can be generated by build tools.
* Remove multiple confusing and overlapping "store reset" APIs.
* Remove costly deep equality checks in favor of immutable structures.
* Avoid making subscriptions part of the default Apollo Client build, instead making them importable.
* Instead of using GraphQL ASTs, power the cache with an efficient "IR" (intermediate representation) that can be understood at both runtime and build time for teams that want to maximize performance.
* This enables teams to completely remove `graphql-js` and startup parsing work from the bundle and send less data over the wire with a predefined set of cache actions per operation/fragment.

* **New cache implementation with more control and better performance:**

* Improve performance of pre-rendered datasets done from SSR or offline storage so that the UI is painted immediately before the data is linked in the cache. This removes blocking thread work for teams that have already fetched the data leading to faster paints.
* Support custom normalization through a new config API. Custom normalization allows for parts of a response to skip costly normalization when it is not needed by the UI. This will use the concept of `Entities` from Apollo Server and allow for teams to tailor performance of the cache to their specific UI needs. Put another way, the new cache will support both the normalization and de-normalization of stored data.
* This allows teams with very large datasets to opt out of more expensive work resulting in much faster reads from the cache.
* It also makes for a more predictable set of actions for working with the cache and enables more possibilities around using fragments directly.
* Automatically garbage collect orphaned entities in the cache to reduce cache memory footprint and "unbound growth" problems for long-running applications
* Properly support cache eviction so that mutations can clean up entities in the cache and data that is deemed "too old" can be pruned from the cache. This allows long-running applications to keep the cache small and snappy.
* Add support for storing errors in the cache. This is critical for offline and SSR apps that might encounter errors that are rendered into the UI.

* **Completely re-architected documentation site explaining the value of Apollo Client:**

* Features a new getting-started section targeted for professional React developers to be productive from day one
* Better explains the architecture of the client and its core features
* Includes in-depth guidelines for running in production, with build tooling (CLI/TypeScript) and better recipes around common actions like auth

## After Apollo Client 3.0

Although we don’t have concrete timelines for the next set of work, we think these are the next challenges to tackle, ordered by priority:

* Redesign Apollo Client's network layer
* We're planning out a simplified but flexible network layer that removes `Observable`'s from the `ApolloLink` API in favor of language primitives. This will simplify custom building, trim bundles, and better support multiple responses.
* Supporting `@defer` and `@stream`
* Fragment-based API for component isolation
* Improved local state API
* Cache segmenting
1 change: 1 addition & 0 deletions docs/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11
93 changes: 51 additions & 42 deletions docs/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,66 +1,75 @@
const themeOptions = require('gatsby-theme-apollo-docs/theme-options');

module.exports = {
pathPrefix: '/docs/react',
__experimentalThemes: [
plugins: [
{
resolve: 'gatsby-theme-apollo-docs',
options: {
...themeOptions,
root: __dirname,
subtitle: 'Apollo Client',
subtitle: 'Client (React)',
description: 'A guide to using the Apollo GraphQL Client with React',
githubRepo: 'apollographql/apollo-client',
defaultVersion: 2.5,
defaultVersion: 2.6,
versions: {
'3.0 beta': 'release-3.0',
2.5: 'version-2.5',
2.4: 'version-2.4',
},
checkLinksExceptions: [
'/api/apollo-client/',
'/v2.4/api/apollo-client/',
],
checkLinksOptions: {
exceptions: [
'/api/apollo-client/',
'/v3.0-beta/api/core/',
'/v2.5/api/apollo-client/',
'/v2.4/api/apollo-client/',
],
},
typescriptApiBox: {
data: require('./docs.json'),
filepathPrefix: 'packages/apollo-client/src/',
},
sidebarCategories: {
null: [
'index',
'why-apollo',
'integrations',
'react-apollo-migration',
null: ['index', 'why-apollo', 'get-started'],
'Fetching data': [
'data/queries',
'data/mutations',
'data/local-state',
'data/subscriptions',
'data/pagination',
'data/fragments',
'data/error-handling',
],
Essentials: [
'essentials/get-started',
'essentials/queries',
'essentials/mutations',
'essentials/local-state',
Caching: ['caching/cache-configuration', 'caching/cache-interaction'],
'Development & Testing': [
'development-testing/static-typing',
'development-testing/testing',
'development-testing/client-schema-mocking',
'development-testing/developer-tooling',
],
Features: [
'features/error-handling',
'features/pagination',
'features/optimistic-ui',
'features/server-side-rendering',
'features/developer-tooling',
Performance: [
'performance/performance',
'performance/optimistic-ui',
'performance/server-side-rendering',
'performance/babel',
],
Advanced: [
'advanced/boost-migration',
'advanced/subscriptions',
'advanced/network-layer',
'advanced/caching',
'advanced/fragments',
Integrations: [
'integrations/integrations',
'integrations/react-native',
'integrations/meteor',
'integrations/webpack',
],
Recipes: [
'recipes/authentication',
'recipes/testing',
'recipes/client-schema-mocking',
'recipes/static-typing',
'recipes/performance',
'recipes/react-native',
'recipes/babel',
'recipes/webpack',
'recipes/meteor',
'recipes/recompose',
'recipes/2.0-migration',
Networking: ['networking/network-layer', 'networking/authentication'],
'API Reference': [
'api/apollo-client',
'api/react-hooks',
'api/react-ssr',
'api/react-testing',
'api/react-components',
'api/react-hoc',
'api/react-common',
],
API: ['api/apollo-client', 'api/react-apollo'],
Migrating: ['migrating/hooks-migration', 'migrating/boost-migration'],
},
},
},
Loading