apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Change pollInterval

Open waitstop opened this issue 8 months ago • 0 comments

In @vue/apollo-composable, the following code won’t work as expected:

const { result: episodesResult, fetchMore: fetchMoreEpisodes, loading: episodesLoading, onResult: onEpisodesResult, startPolling, stopPolling, } = useQuery(
  GetEpisodesDocument,
  episodesVariables,
  { pollInterval: 500 }
)

Why:

  1. startPolling and stopPolling do not exist in @vue/apollo-composable — they are only in Apollo Client for React.
  2. pollInterval is read only once when the query is created. Changing it later won’t start or stop polling.

Are there any built-in options or recommended patterns in @vue/apollo-composable to switch polling on and off without manually managing timers?

waitstop avatar Sep 04 '25 16:09 waitstop