refresh
The lightning/graphql module caches your query results for faster loading. To update the cache and get fresh data, use the refresh method that's returned by the wire adapter.
lightning/graphql doesn’t currently support Mobile Offline use cases. For more information, see GraphQL API Wire Adapter Comparison.
The GraphQL wire adapter uses this GraphQL API resource.
For information on parameters and returned data, see the lightning/graphql module documentation.
refresh reuses the current query, variables, and operation name. It returns a Promise object. The Promise resolves when fresh data is delivered through the wire.
Use the refresh method after a mutation or any external change when you want fresh data, or to bypass cached results.
For more information, see Update Cached Query Results in the GraphQL API Developer Guide.
Don't use refresh() in a polling pattern with setTimeout() or setInterval(). Polling creates unnecessary server load and can degrade performance. Instead, refresh the data once after a mutating operation completes. If you can't determine when a mutation finishes, provide an explicit user-driven refresh action, such as a refresh button, rather than polling automatically.