@mearie/core 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -539,10 +539,9 @@ const normalize = (schemaMeta, selections, storage, data, variables, accessor) =
539
539
  if (inner !== SKIP && !isEntityLink(inner)) mergeFields(fields, inner);
540
540
  }
541
541
  if (entityMeta && storageKey !== null) {
542
- storage[storageKey] = {
543
- ...storage[storageKey],
544
- ...fields
545
- };
542
+ const existing = storage[storageKey];
543
+ if (existing) mergeFields(existing, fields);
544
+ else storage[storageKey] = fields;
546
545
  return { [EntityLinkKey]: storageKey };
547
546
  }
548
547
  return fields;
package/dist/index.mjs CHANGED
@@ -538,10 +538,9 @@ const normalize = (schemaMeta, selections, storage, data, variables, accessor) =
538
538
  if (inner !== SKIP && !isEntityLink(inner)) mergeFields(fields, inner);
539
539
  }
540
540
  if (entityMeta && storageKey !== null) {
541
- storage[storageKey] = {
542
- ...storage[storageKey],
543
- ...fields
544
- };
541
+ const existing = storage[storageKey];
542
+ if (existing) mergeFields(existing, fields);
543
+ else storage[storageKey] = fields;
545
544
  return { [EntityLinkKey]: storageKey };
546
545
  }
547
546
  return fields;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearie/core",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Type-safe, zero-overhead GraphQL client",
5
5
  "keywords": [
6
6
  "graphql",