skevy / graphiql-app

Light, Electron-based Wrapper around GraphiQL
MIT License
2.95k stars 336 forks source link

Query Export, output is not usable #180

Closed jxmot closed 3 years ago

jxmot commented 3 years ago

GraphiQL Version: 0.7.2 OS: Windows 10 (latest)

The "Export Query" menu function does not produce anything that is usable. For example:

Initial Query (formatted as in in the query tab) :

{
  user(login: "someuser") {
    name
    isHireable
    login
  }
}

Export Output:

{
  "query": "{\n  user(login: \"someuser\") {\n    name\n    isHireable\n    login\n  }\n}\n"
}

The output serves no purpose in it current format. It appears that this functionality was introduced in the pull request titled Export query for POST body #106. To be made usable it requires hand editing to fix the escaped newlines.

Bug Work-Around: Select and copy the text directly from the query tab. Paste into a file and save. To import open the text file and pasted its contents directly into the query tab.

jxmot commented 3 years ago

The export format is usable. You can POST what it gives use using Postman, or JavaScript.