Skip to content

Fix link to V3 (Vue 2) documentation #1588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v4
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
[![vue3](https://img.shields.io/badge/vue-3-brightgreen.svg)](https://vuejs.org/)
![GitHub branch check runs](https://img.shields.io/github/check-runs/vuejs/apollo/v4)

:book: Documentation [**for Vue 3**](http://v4.apollo.vuejs.org) | [for Vue 2](https://apollo.vuejs.org/)
:book: Documentation [**for Vue 3**](http://v4.apollo.vuejs.org) | [for Vue 2](https://v3.apollo.vuejs.org)

[:pen: Contributing guide](./CONTRIBUTING.md)


Unchanged files with check annotations Beta

Returns the apollo stores states as JavaScript objects.
```js
const states = ApolloSSR.getStates(clientsObject, options)

Check warning on line 14 in packages/docs/src/api/ssr.md

GitHub Actions / Build and test

'states' is assigned a value but never used. Allowed unused vars must match /^_/u
```
`options` defaults to:
```js
const defaultOptions = {

Check warning on line 20 in packages/docs/src/api/ssr.md

GitHub Actions / Build and test

'defaultOptions' is assigned a value but never used. Allowed unused vars must match /^_/u
// Prefix for the keys of each apollo client state
exportNamespace: '',
}
Returns the apollo stores states as JavaScript code inside a String. This code can be directly injected to the page HTML inside a `<script>` tag.
```js
const js = ApolloSSR.exportStates(clientsObject, options)

Check warning on line 31 in packages/docs/src/api/ssr.md

GitHub Actions / Build and test

'js' is assigned a value but never used. Allowed unused vars must match /^_/u
```
`options` defaults to:
return data.ping
},
// Optional result hook
result({ data, loading, networkStatus }) {

Check warning on line 64 in packages/docs/src/api/smart-query.md

GitHub Actions / Build and test

'networkStatus' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 64 in packages/docs/src/api/smart-query.md

GitHub Actions / Build and test

'loading' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 64 in packages/docs/src/api/smart-query.md

GitHub Actions / Build and test

'data' is defined but never used. Allowed unused args must match /^_/u
console.log('We got some result!')
},
// Error handling
// and decremented when it no longer is.
loadingKey: 'loadingQueriesCount',
// watchLoading will be called whenever the loading state changes
watchLoading(isLoading, countModifier) {

Check warning on line 77 in packages/docs/src/api/smart-query.md

GitHub Actions / Build and test

'countModifier' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 77 in packages/docs/src/api/smart-query.md

GitHub Actions / Build and test

'isLoading' is defined but never used. Allowed unused args must match /^_/u
// isLoading is a boolean
// countModifier is either 1 or -1
},
```js
import { createApolloProvider } from '@vue/apollo-option'
const apolloProvider = createApolloProvider({

Check warning on line 8 in packages/docs/src/api/apollo-provider.md

GitHub Actions / Build and test

'apolloProvider' is assigned a value but never used. Allowed unused vars must match /^_/u
// Multiple clients support
// Use the 'client' option inside queries
// or '$client' on the apollo definition
Signature:
```ts
function mutate(options = null): Promise<FetchResult>

Check warning on line 212 in packages/docs/src/api/apollo-mutation.md

GitHub Actions / Build and test

'mutate' is defined but never used. Allowed unused vars must match /^_/u
```
- `options`: [mutation options](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.mutate).