-
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
useLazyQuery polling? #5140
Comments
@zebbedi Polling should work; it doesn't start until after your first call to the execute function. If it isn't working, then that's a bug. Any chance you could put together a small reproduction that shows the issue? |
Apologies i think we may have jumped the gun. I think the thing that tripped us up was that we replaced a useQuery which had a 'skip: true' for initial load. With this the startPolling function is available immediately. When we swapped it out for a useLazyQuery the startPolling function is undefined and then becomes available only after the result of the first execution. Not sure if that's still a consistency issue or expected? |
Interesting @zebbedi - that does't sound intended. I'll take a look - thanks! |
I have a PR here since October apollographql/react-apollo#3645, I can move it to https://github.com/apollographql/apollo-client/ if there's interest. |
this appears to still be broken. |
If anybody stumbles upon this: you can call initialQuery and then call startPolling |
so basically subscribeToMore and polling is broken? :( :(((((((((((( |
Which version do I need to upgrade to in order to get the fix for this? |
@bcheidemann |
Just trying out the new useLazyQuery hook and the documentation and the TS seem to suggest that it supports polling, however I can't seem to make it work.
Can someone confirm if it does indeed support polling?
The text was updated successfully, but these errors were encountered: