Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#3425·urql

RFC (Graphcache): Change SerializedEntries to provide Map to storage adapters

Author: MookiiesCreated Nov 9, 2023Updated Nov 15, 2023
Labelsfuture 🔮

Summary

Change SerializedEntries to return a Map instead of an object.

This will prevent react-native clients using Hermes from running up against 196607 properties limit and breaking caching. https://github.com/facebook/hermes/issues/851

Proposed Solution

Change the type of SerializedEntries to SerializedEntries = Map<string, string | undefined>;

Downsides

  • SerializedEntries can no longer be JSON.strinigify'ed without using the replacement function
  • Breaking change for all storage adapters (including both shipped as a part of urql)
  • No possibility of ES5 support

Source: urql-graphql/urql

View original on GitHubView discussion on GitHub