Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Creating GraphQL mutations with Blocks

default discord avatar
633kd4dlast year
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.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

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