Why does Apollo recommend polling over subscriptions to stay up to date with the backend?

According to the documentation:

In the majority of cases, your client should not use subscriptions to stay up to date with your backend. Instead, you should poll intermittently with queries

What are the reasons for using polling instead of subscriptions for a typical use-case?

2 Likes

Hey @Dusty_Benac, welcome to the forum! I am but a humble technical writer at Apollo, but here’s my understanding of things:

While subscriptions are great for real-time features with relatively small incremental changes, they come with tradeoffs. Persistent connections add complexity and can be brittle on flaky networks.

Polling is simple, reliable, and can be fine for the user experience. Many apps don’t need data the moment it changes, only when the user is looking, scrolling, or interacting.

So Tl;dr some reasons to use polling (because subscriptions are overkill) are:

  • Backend changes aren’t happening super frequently
  • The frontend where you’re showing changes doesn’t carry the user expectation for real-time

If you have some more specific questions, let us know and I can loop in the right folks!