Overview - Refetching and polling
What is it?
Refetching and polling are ways to keep data fresh in applications using GraphQL. Refetching means asking the server again for data when you want to update it. Polling means automatically asking the server for new data at regular time intervals. Both help apps show the latest information without needing a full page reload.
Why it matters
Without refetching or polling, apps might show old or outdated data, confusing users or causing mistakes. For example, a chat app without polling might not show new messages unless you refresh manually. These techniques keep apps responsive and reliable by ensuring data stays current.
Where it fits
Before learning refetching and polling, you should understand basic GraphQL queries and how to fetch data. After this, you can learn about subscriptions for real-time updates and caching strategies to optimize performance.