Patch Changes
-
Fix writeInsert/writeUpsert throwing error when collection uses select option (#1023)
When a Query Collection was configured with a
selectoption to extract items from a wrapped API response (e.g.,{ data: [...], meta: {...} }), callingwriteInsert()orwriteUpsert()would corrupt the query cache and trigger the error: "select() must return an array of objects".The fix routes cache updates through a new
updateCacheDatafunction that preserves the wrapper structure by using theselectfunction to identify which property contains the items array (via reference equality), then updates only that property while keeping metadata intact.