When getting stale data from the graphcache, __typename is absent, but it should actually be there according to this discussion. This caused a bug in one of my apps which relied on that field to sort some data.
urql version & exchanges:
Steps to reproduce
CodeSandbox Link
- Wait for the list to load a first time,
- Click on "Unmount and Remount List",
- The second time the list shows up, stale data is used at first, and it doesn't have
__typename.
Expected behavior
That __typename is present.
Actual behavior
It's not when getting stale data. One has to wait for the actual network response to get the __typename back, which isn't always suitable (like in my case, where I initialize states with stale data, etc.).
Thank you for your work, and for taking this issue into consideration.
When getting stale data from the graphcache,
__typenameis absent, but it should actually be there according to this discussion. This caused a bug in one of my apps which relied on that field to sort some data.urql version & exchanges:
Steps to reproduce
CodeSandbox Link
__typename.Expected behavior
That
__typenameis present.Actual behavior
It's not when getting stale data. One has to wait for the actual network response to get the
__typenameback, which isn't always suitable (like in my case, where I initialize states with stale data, etc.).Thank you for your work, and for taking this issue into consideration.