Panic when update with filter but without set/remove

mutation {
  addUser(input:[{email:"user"}]) {
    numUids
    user {
      email
      last_name
      first_name
    }
  }
  updateUser(input:{filter:{email:{eq:"user"}},set:{first_name:"First"}}) {
    numUids
    user {
      email
      first_name
      last_name
    }
  }
  updateUser(input:{filter:{email:{eq:"user"}}}) {
    numUids
    user {
      email
      first_name
      last_name
    }
  }
}

Crashes with:

{
  "errors": [
    {
      "message": "Internal Server Error - a panic was trapped.  This indicates a bug in the GraphQL server.  A stack trace was logged.  Please let us know : https://github.com/dgraph-io/dgraph/issues."
    }
  ]
}

(BTW, should link to discuss, not to github)

My original intent was to create “mutate then query”: addUser, then (conditionally) updateUser with partial data, then read back the whole record.

1 Like

This should not be part of error messages. @pawan

Thanks, this is a bug.

I have created a PR to remove it.

It is now fixed with this PR.

1 Like