diff --git a/.changeset/rich-geese-complain.md b/.changeset/rich-geese-complain.md new file mode 100644 index 00000000000..f60df47d644 --- /dev/null +++ b/.changeset/rich-geese-complain.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix error "Cannot convert object to primitive value" diff --git a/src/cache/inmemory/writeToStore.ts b/src/cache/inmemory/writeToStore.ts index a88c875e268..9e7daeb7ebe 100644 --- a/src/cache/inmemory/writeToStore.ts +++ b/src/cache/inmemory/writeToStore.ts @@ -873,7 +873,7 @@ For more information about these options, please refer to the documentation: " have an ID or a custom merge function, or " : "", typeDotName, - existing, - incoming + { ...existing }, + { ...incoming } ); }