Open readeral opened 6 days ago
For context, I was using an Apex API call and using refreshApex with no issue. Swapping out GraphQL equivalents produced this result, so I'm relatively confident in the rest of my component's logic.
Also now I've created this issue, I've realised that my minReproduce example actually rerenders the LWC on the account page with the updated info because I assume it picks up the refreshed cache from the parent page.
The behaviour of the minReproduce component in local dev, if you refresh the page, it displays nothing, because now it's reaching for a cache that (I assume) is somehow incorrectly structured. Maybe the Local Dev cache doesn't handle graphql appropriately?
Summary
I've done my best to give you relevant info, but you might need me to grab more details from Devtools or whatever...
In the context of Local Dev, when using GraphQL with the lightning/uiGraphQLApi Wire adapter, a call to refreshGraphQL doesn't update the wire data on the component.
Deploying source to org and using the LWC without Local Dev, we get the expected result: re-query occurs and UI is re-rendered with fresh data.
Steps To Reproduce:
Expected Result
Record data now reflects the change in the updated API wire property
Actual Result
API call is being made (can see it in Network tab) and is returning correct data, but it isn't making its way into the component API wire response.
Additional Information
I struggled to make a minimum reproducible example because when attaching it to a Lightning layout (in this instance, an Account record layout, with an API call against that same record) there was all sorts of funky cache issues going on in Local Dev, but I managed to get the issue to manifest before the page reaches for the cache.
Screenshots:
Logs:
System Information
SF CLI:
OS: MacOS 15.0.1
minReproduce.zip