Skip to content

Commit 0cacb94

Browse files
tomquirkAkryum
authored andcommitted
docs: Fix all broken links throughout docs (#871)
Somewhere along the line, the official Apollo docs have updated their docs such that most of the links in vue-apollo's docs break. Hence, all links have been updated so that they redirect somewhere. Note that unfortunately direct targets for some items (notably props/options) don't exist, so where necessary, a "best alternative" was chosen
1 parent 401cad1 commit 0cacb94

File tree

11 files changed

+25
-23
lines changed

11 files changed

+25
-23
lines changed

packages/docs/src/api/apollo-mutation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ Example:
2828

2929
- `mutation`: GraphQL query (transformed by `graphql-tag`) or a function that receives the `gql` tag as argument and should return the transformed query
3030
- `variables`: Object of GraphQL variables
31-
- `optimisticResponse`: See [optimistic UI](https://www.apollographql.com/docs/react/features/optimistic-ui.html)
32-
- `update`: See [updating cache after mutation](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-mutation-options-update)
33-
- `refetchQueries`: See [refetching queries after mutation](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-mutation-options-refetchQueries)
31+
- `optimisticResponse`: See [optimistic UI](https://www.apollographql.com/docs/react/performance/optimistic-ui/)
32+
- `update`: See [updating cache after mutation](https://www.apollographql.com/docs/react/data/mutations/#options)
33+
- `refetchQueries`: See [refetching queries after mutation](https://www.apollographql.com/docs/react/data/mutations/#options)
3434
- `clientId`: id of the Apollo Client used by the query (defined in ApolloProvider `clients` option)
3535
- `tag`: String HTML tag name (default: `div`); if `undefined`, the component will be renderless (the content won't be wrapped in a tag)
36+
- `context`: See [apollo context](https://www.apollographql.com/docs/react/data/mutations/#options)
3637

3738
## Scoped slot props
3839

packages/docs/src/api/apollo-query.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ To enable support of `gql` string tag in Vue templates, see the necessary setup
3535

3636
- `query`: GraphQL query (transformed by `graphql-tag`) or a function that receives the `gql` tag as argument and should return the transformed query
3737
- `variables`: Object of GraphQL variables
38-
- `fetchPolicy`: See [apollo fetchPolicy](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-fetchPolicy)
39-
- `pollInterval`: See [apollo pollInterval](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-pollInterval)
40-
- `notifyOnNetworkStatusChange`: See [apollo notifyOnNetworkStatusChange](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-notifyOnNetworkStatusChange)
41-
- `context`: See [apollo context](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-context)
38+
- `fetchPolicy`: See [apollo fetchPolicy](https://www.apollographql.com/docs/react/data/queries/#options)
39+
- `pollInterval`: See [apollo pollInterval](https://www.apollographql.com/docs/react/data/queries/#options)
40+
- `notifyOnNetworkStatusChange`: See [apollo notifyOnNetworkStatusChange](https://www.apollographql.com/docs/react/data/queries/#options)
41+
- `context`: See [apollo context](https://www.apollographql.com/docs/react/data/queries/#options)
4242
- `update`: Function to transform the result `data`, useful for picking a specific part of the response. Example: `:update="data => data.user.messages"`
4343
- `skip`: Boolean disabling query fetching
4444
- `clientId`: id of the Apollo Client used by the query (defined in ApolloProvider `clients` option)
@@ -56,7 +56,7 @@ To enable support of `gql` string tag in Vue templates, see the necessary setup
5656
- `result.fullData`: Raw data returned by the query (not transformed by the `update` prop)
5757
- `result.loading`: Boolean indicating that a request is in flight (you may need to set `notifyOnNetworkStatusChange` prop for it to change)
5858
- `result.error`: Eventual error for the current result
59-
- `result.networkStatus`: See [apollo networkStatus](https://www.apollographql.com/docs/react/basics/queries.html#graphql-query-data-networkStatus)
59+
- `result.networkStatus`: See [apollo networkStatus](https://www.apollographql.com/docs/react/data/queries/#result)
6060
- `query`: Smart Query associated with the component. It's useful to do some operations like `query.refetch()` or `query.fetchMore()`.
6161
- `isLoading`: Smart Query loading state
6262
- `gqlError`: first GraphQL error if any

packages/docs/src/api/smart-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ this.$apollo.queries.users.setVariables({
229229

230230
### setOptions
231231

232-
Update the Apollo [watchQuery](https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.watchQuery) options and refetch:
232+
Update the Apollo [watchQuery](https://www.apollographql.com/docs/react/api/apollo-client/#ApolloClient.watchQuery) options and refetch:
233233

234234
```js
235235
this.$apollo.queries.users.setOptions({

packages/docs/src/guide/apollo/mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Mutations are queries that change your data state on your apollo server.
44

55
Use `this.$apollo.mutate()` to send a GraphQL mutation.
66

7-
For more info, visit the [apollo doc](https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.mutate). There is a mutation-focused [example app](https://github.com/Akryum/vue-apollo-todos) you can look at.
7+
For more info, visit the [apollo doc](https://www.apollographql.com/docs/react/api/apollo-client/#ApolloClient.mutate). There is a mutation-focused [example app](https://github.com/Akryum/vue-apollo-todos) you can look at.
88

99
::: warning
1010
You shouldn't send the `__typename` fields in the variables, so it is not recommended to send an Apollo result object directly.

packages/docs/src/guide/apollo/queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You can use the apollo `watchQuery` options in the object, like:
140140
- `pollInterval`
141141
- ...
142142

143-
See the [apollo doc](https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.watchQuery) for more details.
143+
See the [apollo doc](https://www.apollographql.com/docs/react/api/apollo-client/#ApolloClient.watchQuery) for more details.
144144

145145
For example, you could add the `fetchPolicy` apollo option like this:
146146

packages/docs/src/migration/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ import { WebSocketLink } from 'apollo-link-ws'
193193
import { getMainDefinition } from 'apollo-utilities'
194194
```
195195

196-
Learn more at the [official apollo documentation](https://www.apollographql.com/docs/react/2.0-migration.html).
196+
Learn more at the [official apollo documentation](https://www.apollographql.com/docs/react/v2.5/recipes/2.0-migration).

packages/docs/src/zh-cn/api/apollo-mutation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828

2929
- `mutation`:GraphQL 查询(由 `graphql-tag` 转换)或一个接收 `gql` 标签作为参数并返回转换后的查询的函数
3030
- `variables`:GraphQL 变量对象
31-
- `optimisticResponse`:详见 [乐观 UI](https://www.apollographql.com/docs/react/features/optimistic-ui.html)
32-
- `update`:详见 [变更后更新缓存](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-mutation-options-update)
33-
- `refetchQueries`:详见 [变更后重新获取查询](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-mutation-options-refetchQueries)
31+
- `optimisticResponse`:详见 [乐观 UI](https://www.apollographql.com/docs/react/performance/optimistic-ui/)
32+
- `update`:详见 [变更后更新缓存](https://www.apollographql.com/docs/react/data/mutations/#options)
33+
- `refetchQueries`:详见 [变更后重新获取查询](https://www.apollographql.com/docs/react/data/mutations/#options)
3434
- `clientId`:查询所使用的 Apollo 客户端 id(在 ApolloProvider 的 `clients` 选项中定义)
3535
- `tag`:字符串,HTML 标签名(默认值:`div`);如果是 `undefined`,该组件将成为无渲染组件(内容不会被包装在标签中)
36+
- `context`:详见 [apollo context](https://www.apollographql.com/docs/react/data/mutations/#options)
3637

3738
## 作用域插槽 props
3839

packages/docs/src/zh-cn/api/apollo-query.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535

3636
- `query`:GraphQL 查询(由 `graphql-tag` 转换)或一个接收 `gql` 标签作为参数并返回转换后的查询的函数
3737
- `variables`:GraphQL 变量对象
38-
- `fetchPolicy`:详见 [apollo fetchPolicy](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-fetchPolicy)
39-
- `pollInterval`:详见 [apollo pollInterval](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-pollInterval)
40-
- `notifyOnNetworkStatusChange`:详见 [apollo notifyOnNetworkStatusChange](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-notifyOnNetworkStatusChange)
41-
- `context`:详见 [apollo context](https://www.apollographql.com/docs/react/basics/queries.html#graphql-config-options-context)
38+
- `fetchPolicy`:详见 [apollo fetchPolicy](https://www.apollographql.com/docs/react/data/queries/#options)
39+
- `pollInterval`:详见 [apollo pollInterval](https://www.apollographql.com/docs/react/data/queries/#options)
40+
- `notifyOnNetworkStatusChange`:详见 [apollo notifyOnNetworkStatusChange](https://www.apollographql.com/docs/react/data/queries/#options)
41+
- `context`:详见 [apollo context](https://www.apollographql.com/docs/react/data/queries/#options)
4242
- `update`:用于转换结果 `data` 的函数,用于在响应中选择特定部分。示例:`:update="data => data.user.messages"`
4343
- `skip`:布尔值,禁用查询获取
4444
- `clientId`:查询所使用的 Apollo 客户端 id(在 ApolloProvider 的 `clients` 选项中定义)
@@ -56,7 +56,7 @@
5656
- `result.fullData`:查询返回的原始数据(未使用 `update` 属性转换)
5757
- `result.loading`:布尔值,表明请求正在进行中(你可能需要设置 `notifyOnNetworkStatusChange` 属性来修改它)
5858
- `result.error`:当前结果的最终错误
59-
- `result.networkStatus`:详见 [apollo networkStatus](https://www.apollographql.com/docs/react/basics/queries.html#graphql-query-data-networkStatus)
59+
- `result.networkStatus`:详见 [apollo networkStatus](https://www.apollographql.com/docs/react/data/queries/#result)
6060
- `query`:与组件关联的智能查询,用于执行 `query.refetch()``query.fetchMore()` 之类的操作
6161
- `isLoading`:智能查询加载状态
6262
- `gqlError`:第一个 GraphQL 错误(如果有)

packages/docs/src/zh-cn/api/smart-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ this.$apollo.queries.users.setVariables({
224224

225225
### setOptions
226226

227-
更新 Apollo [watchQuery](https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.watchQuery) 选项并重新获取:
227+
更新 Apollo [watchQuery](https://www.apollographql.com/docs/react/api/apollo-client/#ApolloClient.watchQuery) 选项并重新获取:
228228

229229
```js
230230
this.$apollo.queries.users.setOptions({

packages/docs/src/zh-cn/guide/apollo/queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ apollo: {
140140
- `pollInterval`
141141
- ...
142142

143-
更多细节请查看 [apollo 文档](https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.watchQuery)
143+
更多细节请查看 [apollo 文档](https://www.apollographql.com/docs/react/api/apollo-client/#ApolloClient.watchQuery)
144144

145145
例如,你可以像这样添加 `fetchPolicy` apollo 选项:
146146

0 commit comments

Comments
 (0)