Skip to content
Discussion options

You must be logged in to vote

This is due to a change introduced in #704

In short: you should use the parent type as input type, and instead of providing a null value when you wish to omit the field, omit the field from the variable.

Example for your mutation:

mutation update_property_by_id($id: Int!, $setInput: properties_set_input!) {
  update_properties_by_pk(pk_columns: {id: $id}, _set: $setInput}) {
    id
    address
    hidden
    valuation
  }
}

Assuming you only want to update the address field, your variables would then look like this:

{
  "id": 2,
  "setInput": { "address":"6 High St" }
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@PopBot
Comment options

Answer selected by BenoitRanque
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants