Generated component displays data only once with default execution strategy
Is there an existing issue for this?
- [x] I have searched the existing issues
Product
Strawberry Shake
Describe the bug
If data returned by a GraphQL query doesn't change between calls, then its generated <Use... /> component with default execution strategy (NetworkOnly) displays the data only the first time it's accessed. If you navigate away from a page with the component and come back, the call to the GraphQL API end-point is made, but the data is not displayed.
Steps to reproduce
- Write a query that will always return the same data (for example crypto names only)
- Run
dotnet buildto generate code - Put the generated
<Use... />component on a page and provide content forChildContent(do not change the default execution strategy) - Run the app and navigate to that page (API call returns data which is displayed correctly)
- Navigate away and come back to the page (API call returns the same data as before, but it is not displayed)
Relevant log output
No response
Additional Context?
Here's a simple app I've created to reproduce the issue: https://github.com/elishnevsky/StrawberryShakeBug
Version
13.0.0-rc.0
Have the same issue on 13.0.2 Problem only occurs on ExecutionStrategy.NetworkOnly. If ExecutionStrategy.CacheFirst or ExecutionStrategy.CacheAndNetwork is used it behaves as expected.