hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.05k stars 2.77k forks source link

GraphiQL does not prettify where clauses #1571

Open elgordino opened 5 years ago

elgordino commented 5 years ago

When running 'prettify' in GraphiQL it just where clauses onto one line, resulting in them being much less 'pretty'

eg

thing(where: {_and: [{abc: {_eq: $abc}}, {_or: [{foo: {bar: {value: {_ilike: "%gor%"}}}}, {foo: {baa: {boo: {moo: {value: {_ilike: "%gor%"}}}}}}]}]}) {
BatuhanW commented 5 years ago

+1 for this. I'm prettifying queries myself. If I accidently click prettify, now I have single line with 500 characters long. I can't read anything.

ARMATAV commented 4 years ago

+1 for this, I troll myself every time by clicking prettify and getting wrecked.

bitjson commented 4 years ago

This would really improve my workflow. 👍

Right now I typically copy/paste queries from the Hasura console into a VSCode window, where I can reformat the query with the Prisma vscode-graphql extension.

vxm5091 commented 2 years ago

+1

ravargash commented 1 year ago

+1

ARMATAV commented 1 year ago

any updates on this?

im now 26 years old, still have to scroll right

gtupak commented 1 year ago

+1

manasag commented 8 months ago

This feature is dependent on support by the GraphiQL library. There is an open issue with GraphiQL on the same. We have tested with GraphiQL 2 (with Hasura V3), and its still not supported. Please report if there is way latest GraphiQL supports this (and we may have missed it in our investigation).