Does anyone know how to submit a mutation to a collection that has blocks in it? According to the schema, they are JSON, but sending an array of objects for the block ends up with the DB strangely corrupted ("Cannot read properties of undefined (reading 'name')") which is weird since none of my fields are called 'name'.
Submitting individual items to fields declared as JSON works fine. It's just blocks that have problems.
Here is some seed data that inserts blocks into a test collection. This is not graphql specifically but the shape should be the same, maybe it will point you in the right direction.
👍 Sending the blockName and blockType along with the block objects seems to be the magic I was looking for. Thank you!
Very nice 🙂
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.