graphql-compose-mongoose icon indicating copy to clipboard operation
graphql-compose-mongoose copied to clipboard

Unexpected behaviour when upgrading to mongoose 6 with mutation resolvers

Open trollcus opened this issue 4 years ago • 1 comments

When updating a nested field with a updateOne resolver, all the other field in that same object field becomes null.

let's say we have:

basic_info {
size
email
}

when updating one of the fields, the other ones becomes null.

Had to downgrade to mongoose 5 for now as it's working as expected there.

trollcus avatar Sep 21 '21 08:09 trollcus

Send the whole document with an updated field. That's the only solution for now until someone fixes this.

steverogers180 avatar Jan 17 '22 21:01 steverogers180