Creating GraphQL mutations with Blocks

default discord avatar
633kd4d
7 months ago
3

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.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.