Context
From PR #28 review.
Problem
Both PATCH endpoints (memora/graph/server.py and memora-graph/functions/api/memories/[id].ts) replace the entire metadata object when metadata is present in the request body, instead of merging with existing keys.
Example: PATCH {"metadata": {"a": 3}} against {"a": 1, "b": 2} drops key b.
Not a problem in normal UI usage (the UI sends the full metadata object), but breaks for direct API callers sending partial updates.
Fix
Merge incoming metadata with existing: merged = { ...existing, ...incoming } (or {**existing, **incoming} in Python).
Files
memora/graph/server.py:331
memora-graph/functions/api/memories/[id].ts:106
Context
From PR #28 review.
Problem
Both PATCH endpoints (
memora/graph/server.pyandmemora-graph/functions/api/memories/[id].ts) replace the entire metadata object whenmetadatais present in the request body, instead of merging with existing keys.Example:
PATCH {"metadata": {"a": 3}}against{"a": 1, "b": 2}drops keyb.Not a problem in normal UI usage (the UI sends the full metadata object), but breaks for direct API callers sending partial updates.
Fix
Merge incoming metadata with existing:
merged = { ...existing, ...incoming }(or{**existing, **incoming}in Python).Files
memora/graph/server.py:331memora-graph/functions/api/memories/[id].ts:106