Skip to content

Unable to update Matrix field using updateViewer Mutation #148

@Nic1911

Description

@Nic1911

Hi!

I'm trying to update a Matrix field via the updateViewer mutation.

The field has blocks with 3 inner fields (String):

Screenshot 2024-03-21 alle 10 18 03

In GraphQL I'm using the following Mutation:

mutation UPDATE_CART(
    $leathers: [cart_MatrixBlockContainerInput]
) {
  updateViewer(cart: {blocks: $leathers}) {
    id
    ... on User {
      id
      cart {
        ... on cart_leather_BlockType {
          id
          leatherId
        }
      }
    }
  }
}

Then I pass the following variables:

"leathers": [{
  "leather": {
      "id": "919191910" , 
      "leatherId": 5330, 
      "quantity": 100, 
     "collectionId": 5322
   }
}]

I'm also passing an Authorization token JWT and the Mutation runs without errors, but the matrix field is empty.

Does anyone had the same issue?
Thanks in advance and regards,

Nicolò

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions