postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.81k stars 839 forks source link

GraphQL Beautify & Keep Comments #12748

Open hero3616 opened 5 months ago

hero3616 commented 5 months ago

Is there an existing request for this feature?

Is your feature request related to a problem?

GraphQL specification includes comments with pound '#' sign. Postman GraphQL Beautify feature works great except for a little annoyance: it removes valuable comments!! Some people may prefer that but I'd like to have a settings that would keep GraphQL comments (line or text starting with pound '#' sign).

Describe the solution you'd like

A setting in Settings -> Editor Settings -> GraphQL -> Keep comments (i.e. # My comment text) when Beautify button is clicked

Describe alternatives you've considered

No response

Additional context

No response

timhall commented 5 months ago

Hi @hero3616 thanks for raising this issue. We're planning on integrating Prettier for formatting GraphQL queries, which keeps comments when beautifying. I'll update this issue with our team's progress.