I am trying to create a new entry in Craft CMS using GraphQL. The entry has a matrix field called "vehicles" that has a single block called "vehicle". This block has a single field called "vehicleValue".
In GraphiQL I am using the following query to save a new entry:
mutation SaveVehicle($vehicles: vehicles_MatrixInput) {
save_applications_application_Entry(vehicles: $vehicles) {
uid
vehicles {
... on vehicles_vehicle_BlockType {
vehicleValue
}
}
}
}
Then I pass the following variables:
{
"vehicles": {
"blocks": [
{
"vehicle": {
"vehicleValue": 111
}
}
]
}
}
The query runs and a new entry is created but the matrix field is empty.
The schema is public so no auth is required.
I am new to using Craft and GraphQL so it is probably something simple. Any help would be greatly appreciated.