Skip to content
Discussion options

You must be logged in to vote

@evanRetool
Hope, you were able to use Input Type to consolidate all the input variables.

Here is some additional info to help you build your mutation :

mutation MyMutation($id: String!, $update: users_set_input!) {
  update_users_by_pk(pk_columns: {id: $id}, _set: $update) {
    account_admin
    account_id
    completed_onboarding
    email
    first_name
    last_name
  }
}

Your would pass the following variables (to just set the account_admin to true and leave other fields untouched):

{
  "id": "myid",
  "update": {
    "admin": true
  }
}

However, you would see null values in the other fields if you are using nullable variables for those.
Because, nullable variables for which a val…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@evanRetool
Comment options

@adas98012
Comment options

@evanRetool
Comment options

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