-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
pollInterval option only supported on watchQuery error #3395
Comments
Setting a polling interval is not supported when using |
`ApolloClient.query` is currently configured to accept `WatchQueryOptions`, which means the docs show people that passing things like `pollingInterval` into `ApolloClient.query` is supported (when in reality it's only supported when using `ApolloClient.watchQuery`). These changes add a new `QueryOptions` interface, and pull some of the common options out into a parent `QueryBaseOptions` interface. `ApolloClient.query` has been updated to use the `QueryOptions` interface, which should help clear up a bit of confusion. Fixes #3395.
This has been fixed in #3569. Thanks! |
https://github.com/apollographql/apollo-client/blob/main/src/core/watchQueryOptions.ts#L86 This is still wrong. Also, setting a polling interval on |
Is there a technical reason why polling isn't supported in |
It's still a bug in V3 also |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Intended outcome:
Fired a query using ApolloClient.query(options) as described in https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.query. I get the error "pollInterval option only supported on watchQuery". If i use watchQuery, adding pollInterval works, but not sure if I need observable queries, plus watchQuery is not well documented (subscribing to observable queries).
Actual outcome:
I get the error "pollInterval option only supported on watchQuery".
How to reproduce the issue:
Query using ApolloClient.query(options) as described in https://www.apollographql.com/docs/react/api/apollo-client.html#ApolloClient.query.
Version
"apollo-client": "2.2.2"
The text was updated successfully, but these errors were encountered: