Ratel Dashboard post duplicate query and mutate

Moved from GitHub ratel/107

Posted by LoganLee1991:

When I click “run” button in the Ratel dashboard console, the mutate (or query) operation will execute two times, which make two nodes added, not one it should be. Is it a bug or any thing i do wrong?

dgraph version: Dgraph v1.0.16, Binaries for Windows
ratel dashboard: Local Bundle version
browser: Firefox 68.0.2

catsalt commented :

yes, I find that too…
when Mutation from the local console.

Dgraph v1.0.17 Windows
Browser, Edge

paulftw commented :

Just tried this on my local instance and could not reproduce the two nodes added part.
@LoganLee1991 can you please run a query to confirm that indeed two nodes got added in your system?

Two requests are normal because the first one is CORS pre-flight (HTTP OPTIONS), the second one is the actual request.

Closing this bug because from what’s reported in here and based on my test everything’s working as expected.
If anyone is still seeing duplicate nodes – please re-open

LoganLee1991 commented :

I do the same test as you did, and i found two nodes with different uid.
Thanks for your response. @paulftw
you can see that same POST request occured when do mutation and query operation.