Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"prettify" query #48

Closed
gre opened this issue Nov 4, 2015 · 1 comment
Closed

"prettify" query #48

gre opened this issue Nov 4, 2015 · 1 comment

Comments

@gre
Copy link
Contributor

gre commented Nov 4, 2015

my common usecase is to paste a query that was generated by Relay and see what it does.

However, the Relay queries are pretty obfuscated, it would be great to have a button that prettify the query textarea.

I was playing around with this code:

function blockIndent(editor, from, to) {
  editor.operation(function() {
    for (var i = from; i < to; ++i)
      editor.indentLine(i, "smart");
  });
}

but it just indents, it does not do the "return to new line" work.

@leebyron
Copy link
Contributor

Good suggestion

gre added a commit to gre/graphiql that referenced this issue Nov 28, 2015
asiandrummer added a commit that referenced this issue Jan 27, 2016
Fixes #48: add a prettify query button
acao pushed a commit to acao/graphiql that referenced this issue Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants