Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to properly use polling methods of QueryRef?#2315

Unanswered
jayyren asked this question inQ&A
Discussion options

Hi everyone!
As I need to start and stop polling condintionally, I tried to implementstartPolling andstopPolling methods ofQueryRef type, but unfortunately it doesn't work in my case

Discussion here has similar implementation but probably it's too outdated
https://stackoverflow.com/questions/57406947/how-to-stop-polling-in-angular-apollo-client

My implementation. Angular 17

//component      queryRef: QueryRef<unknown> = this.scanQueueService.getImagesScanQueue();      ngOnInit() {        this.queryRef.startPolling(500);      }      //service  getImagesScanQueue() {    return this.apollo.watchQuery({      query: getImagesScanQueue(),      fetchPolicy: 'network-only',    });  }
You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@jayyren

[8]ページ先頭

©2009-2025 Movatter.jp