Query state randomly changing property structure

Hey all,

I've got an issue with the state for my REST queries, where some of the properties move around. In the example below ♦️.metadata has switched to ♦️.data.metadata, and ♦️.data.meta switches to ♦️.data.data.meta along with a few others. ♦️.error is the only non breaking change.

The change happened randomly between one of many updates on the query's success/failure event handler. No recent version updates or similar changes that could've triggered it.



Self hosted 3.20.15

Hey @rixlayer, sorry for the delay here. Does the property structure change based on the return value / status of the response of the query? Is it now static that the properties are nested under an additional .data property?

Hi @rixlayer. I'm pretty sure the data.meta is from your server response. There are also metadata added by Retool, but for our internal use mostly. We don't change the structure of your response but because we add a layer of wrapping around your response, to access everything you need an additional step of data. (eg. data.data.meta).

Hey @joeBumbaca, It would have different structures for the same query being fired twice within a minute of each other, that returns the same data. It happened at least once after every time the app state resets.

Hey @Harry_Doan, thanks for explaining how that works. I believe the issue I was having was the additional layer of wrapping around the response wasn't consistent and would be missing sometimes. (eg. when it bugs out, I'd have to use data.meta instead of data.data.meta).

I've updated to a different version since, and haven't had this happen recently.
Maybe we can close this ticket for now.

2 Likes