`watchQuery` can't work with `v2.1.3`
See original GitHub issuewatchQuery
can’t work with v2.1.3
I tried it like this:
import { Vue, Component } from 'nuxt-property-decorator';
@Component({
...
})
export default class IndexPage extends Vue {
watchQuery: string[] = ['label', 'page'];
...
So strange, i see other hooks like asyncData
works well, but watchQuery
does nothing when query changes.
Here is a repository to show a demo: https://github.com/shalldie/nuxt-ts-watchQuery
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
class ApolloClient - Apollo GraphQL Docs
Provide this object to set application-wide default values for options you can provide to the watchQuery , query , and mutate functions. See...
Read more >client.watchQuery does not start polling when `pollInterval` given
Intended outcome: When calling client.watchQuery with the pollInterval set, the query should be run periodically with the provided interval.
Read more >client.watchQuery cannot be called with fetchPolicy set to ...
In my case, the apollo client version was 3.0.2. Updating my package.json "@apollo/client": "~3.4.0" and re running npm i finally did the ...
Read more >ApolloClient - Client (React) - Apollo GraphQL Docs
The constructor for ApolloClient accepts an ApolloClientOptions object that supports the required and optional fields listed below. These fields make it easy to ......
Read more >@apollo/client | Yarn - Package Manager
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found that,
watchQuery
must be part ofComponentOptions
layout
must be astatic field of class
.I think thease should be the
fields of class instance
, or, a description should be in thereadme.md
Can we have some clarity here? I don’t think I understand the accepted workaround.
I get typing error when I add
watchQuery
to@Component