PartialUpdate with GraphQL returns null, but no errors?

Been tearing my hair out on this one for the past hour:

All my fields are correct and present, and suggested in the IDE so it’s not the same issue from back in May. It’s just … not updating the record. And not throwing any errors.

Mutation:

mutation Update($item: PartialUpdateArticleInput!, $id: ID!){
  partialUpdateArticle(
    id: $id
    data: $item
  ) {
  	headline
  }
}

Variables:

{
  "id": "321914237385441351",
  "item": {
    "headline": "this is weird but",
    "articleBody": "??????"
  }
}

Headers:

{
  "X-Schema-Preview": "partial-update-mutation",
  "authorization": "Basic  <TOKEN>"
}

Response:

{
  "data": {
    "partialUpdateArticle": null
  }
}

Hi @Nikolas_Wise and welcome!

The update and partialUpdate mutations are intended (for better or worse) to return null if the id is not found.

I know you said that your fields are correct, but can you double check in your Collections tab that there is, in fact, an Article with id 321914237385441351

or alternatively in the shell run

Get(Ref(Collection("Article"), "321914237385441351"))

Well! That seems to be correct – makes me wonder where I got that ref in the first place.

The Null result is def weird and could be documented better, but I guess it makes sense if I squint at it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.