The issue is when data is sent down via a subscription, updateQuery is ran and the new data is merged into old data. The result is removed from the object.
I've created a reproduction of the issue I'm having https://github.com/jakelacey2012/react-apollo-subscription-problem here.
I've included the server and the front end, the front end is where I feel the issue is and here is the main bulk of the code which I've put into one file.
Is just a create-react-app, just yarn & yarn start should get you going there.
yarn & yarn start
so this

after updateQuery results in this

I would expect the new data to be merge in, because that is what I'm returning from the updateQuery in the subscribe to more function
@jakelacey2012 it looks like your subscription onNoteAdded is not returning the same fields as NotesQuery (created is missing). Let me know if that helps!
Thank you!! It worked!!
I guess this actually makes sense because you want the new data to be the same 'shape' at the old data. Is there any documentation that expresses this?
I think it's not in the docs because this issue has been coming up a few times lately 馃槃
related: apollographql/apollo-client#1611
Most helpful comment
@jakelacey2012 it looks like your subscription
onNoteAddedis not returning the same fields asNotesQuery(createdis missing). Let me know if that helps!