Idempotently setting the initial document content (with webrtc

Please also have a look at the whole discussion at Initial offline value of a shared document

You can keep the collaboration stuff over webrtc. But you should send & retrieve the Yjs from GraphQL. Not the text document. You will always duplicate content if you don’t start with the same history.