Idempotent mutations with no impact shouldn't modify "Updated at"


  1. Run an idempotent mutation (example one shown below)

  2. Observe that labels are added to the issue and the “updatedAt” field is now whenever you ran the mutation (this is good)

  3. Run the same idempotent mutation again

  4. Nothing happened, which is good, except…

  5. Observe that the “updatedAt” field has changed (this is bad)

This is really not great for several reasons:

 * It’s confusing for users because the issue now appears at the top of “Most recently updated” even though nothing observable has happened

 * It’s confusing for API developers because there’s no associated timeline event (thank goodness!), so the updatedAt field will *sometimes* not match the last timeline event

 * It creates needless work for tools that operate on a “Don’t do anything if the issue is unchanged since the last time I looked at it” basis

 * It’s extra work for GraphQL apps who don’t want to trigger this behavior, because they have to compute themselves whether their proposed mutation is actually needed, which goes against the spirit of GraphQL mutations

mutation setLabels {
  addLabelsToLabelable(input: {
    labelableId: "MDU6SXNzdWU1MDU0NjA4ODE=",
    labelIds: ["MDU6TGFiZWwxMDE3NjU4MTk5", "MDU6TGFiZWwxMDE3NjU4MjAw"]
  }) {
1 Like

Hi @ryancavanaugh,

Thanks for this great feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.