function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
scott_devscott_dev 

@wire callback function doesn't execute on refreshApex()

Hello, this question is related to LWC development. I have recently discovered (through many hours of frustration and troubleshooting) that when using an @wire for an apex method that the callback function is not executed if:
  • the @wire is triggered by a refreshApex() call
  • the serverside data has not changed
In all other scenarios the callback function will execute. 
Is this by design, or is this a bug?  The documentation does not mention anything about the data needing to change for the callback function to execute when using refreshApex(): https://developer.salesforce.com/docs/component-library/documentation/en/48.0/lwc/lwc.apex
Nick Gachowicz 14Nick Gachowicz 14
Hi Scott, I am experiencing the same issue as you. I want to use refreshApex to re-initialise a component and discard any client side changes that have been made by a user. But refreshApex is not updating the component because the data has not changed server-side.

Did you find a way to overcome this issue?