Upsert mutation replacing entire document

I’m trying to use upsert mutation in one of my project. When the query matches with existing document, upsert mutation is replacing the whole document instead of specific fields passed down through data argument.

The expected behaviour is, it should be updating the fields which are provided through the data argument.

Also in the docs , it says upsert replacing the document. Please confirm this & suggest any other workarounds.

Did you ever find a solution around this?

I too think the expected behavior is to merge not replace

No, We shifted to mongoose for such use cases.