Report Client-Side Storage Bug

Hi,

I have been trying to save the data retrieved from my REST API to my client-side data storage to ensure that the user experience is smooth without much delay.

My client-side data has been defined for a list of object with 15 properties, similar to the schema used for my rest API database

However, for some reason AppGyver reads that my client-side data has only 1 property, making it incompatible to record the data using the ‘Replace Client-Side Storage’ logic

Even when I wanted to set the data manually, it only appears for 1 property i.e. id. All the other scheme did not appear. While I am 100% sure that I have set up the property correctly, as it was successful if I use the common ‘Create Record’ logic

It seems like the logic was unable to detect the schema that we have set for the internal data

I’m pretty sure this is a bug. Please look at it.

Thank you

I tried to play around further, and I realised that the bug does not lie with the ‘Replace Client-Side Storage’ but instead with the client-side storage itself.

For example if I use the ‘Set Item to Storage’ logic and use the subsequent ‘Get Data from Storage’ logic, the data is able to save to an App Variable, but is unable to save to Client-Side storage

Hi, the Set / Get item from storage flow functions don’t work well together with client side resources, because they don’t have a set schema. If you want to work with client-side resources, you can use the Create record and Get record nodes to do the same thing. Set / Get item from storage are more of a “quick fix” and better for saving things like access tokens etc. without checking that the item is actually according to some predefined schema, as in the data resources.

Unfortunately the create record node is only capable of storing one item at a time, while I wanted to immediately save a set of array.

I tried looping the array one by one and use the create record node, but it takes too long that made it impractical

You can just store a list of objects or whatever data you’re storing into a single record. Something like:

{
  "id": VALUE,
  "records": [
     OBJECT_1, OBJECT_2, ...
   ]
}

Hi, that seems to be a good idea

However, the id value is automated and we are unable to change the value. Hence it is difficult to update the database if there is any change as we do not know the automated id value. For any new create record, it will add new item into the array and hence it will also be difficult to get the latest record, not to mention the database will be too big for in the future isn’t it?

Is there any workaround for this?