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

community/tools-and-libraries: GraphQL formatter #1801

Open
3052 opened this issue Oct 23, 2024 · 2 comments
Open

community/tools-and-libraries: GraphQL formatter #1801

3052 opened this issue Oct 23, 2024 · 2 comments

Comments

@3052
Copy link

3052 commented Oct 23, 2024

I am looking for a GraphQL formatter:

https://wikipedia.org/wiki/Prettyprint

I dont see one here:

https://graphql.org/community/tools-and-libraries

I found some online, but they are all pretty terrible:

https://jsonformatter.org/graphql-formatter

no option to change indent for example

@3052
Copy link
Author

3052 commented Oct 24, 2024

ah found one

https://prettier.io/playground

@benjie
Copy link
Member

benjie commented Oct 24, 2024

prettier is the formatter I use. You can also use print(parse(document)) using import { print, parse } from 'graphql' in JS, though it does not to text wrapping/etc.

@benjie benjie closed this as completed Oct 24, 2024
@benjie benjie reopened this Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants