ChromeiQL icon indicating copy to clipboard operation
ChromeiQL copied to clipboard

Don't execute mutations automatically

Open aschmied opened this issue 7 years ago • 1 comments

Steps

  1. Open ChromeiQL
  2. Type and execute a mutation
  3. Close ChromeiQL
  4. Open ChromeiQL
  5. Type a new URL and click "set endpoint"

Result

The mutation is executed after both steps 4 and 5. This is potentially destructive. Lots of time might have passed between steps 3 and 4 and I might not even remember that I left a mutation query lying around. Even if I do remember I don't know of a way to open ChromeiQL without executing the existing query. If the URL I typed in step 5 was a production URL this could be catastrophic.

Notes

It's a bad practice to leave mutations lying around in the query window, but when I'm developing a mutation API it is a very easy mistake to make.

aschmied avatar Jan 24 '19 14:01 aschmied

You might be interested to know that this issue has been fixed in our fork: https://github.com/PowerKiKi/graphiql-extension/pull/1

PowerKiKi avatar Jul 01 '20 05:07 PowerKiKi