graphql-for-vscode icon indicating copy to clipboard operation
graphql-for-vscode copied to clipboard

Can this extension become a formatter?

Open frederikhors opened this issue 4 years ago • 4 comments

Is there a way to format my schema.graphql files in Visual Studio Code?

If I install this extension and reload Visual Studio Code and try to format my file it every time complains with:

There is no formatter for 'graphql'-files installed.

Is there a formatter?

Can this extension become a formatter?

frederikhors avatar Oct 08 '19 19:10 frederikhors

Good question. Let me research a little bit on this topic.

kumarharsh avatar Oct 09 '19 08:10 kumarharsh

@kumarharsh any news on this? It would be amazing! Today there is nothing easy to accomplish this in vscode.

frederikhors avatar Apr 05 '20 18:04 frederikhors

Haven't had time to look into this extension lately. I think Prettier should have something for this, but still have to research. If you do find a solution, I'd be open to a PR too.

kumarharsh avatar Apr 05 '20 18:04 kumarharsh

Prettier is too heavy and intereferes with other plugins for other projects types (JS).

frederikhors avatar Apr 05 '20 18:04 frederikhors