0

on_conflict returns unknown argument

new to hasura, tried looking at multiple how to on_conflict, ran mutation from api explorer and from frontend, tried upsert_users (suggest me to change it to insert)

mutation upsert_users {
 insert_users(
    objects: [{
    auth0_id: "iexistindb", 
    name: "somename"}
  ], 
  on_conflict: {
  constraint: users_pkey, 
  update_columns: [last_seen, name]
  }
) {
    affected_rows
  }
}

expected to update the user table if auth0 already exist

Dharman
  • 30,962
  • 25
  • 85
  • 135

1 Answers1

1

so i just encountered this now. i had the on_conflict / update_columns but hadn't given update permissions to the role, only insert

chrishawn
  • 478
  • 1
  • 4
  • 12