-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implemented Prettier for GraphQL formatting #4022
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fantastic!
I tested with
type Query {
me: User
}
# comment that shouldn't go away
type User {
id: ID
name: String
}
mutation UpdateBasicInfo($id: ID!, $firstName: String, $middleName: String, $lastName: String, $gender: string, $birthDate: DateTime) {
updateEmployee(employee: {id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, gender: $gender, birthDate: $birthDate }) {
id
firstName
middleName
lastName
gender
birthDate
}
}
BEFORE | AFTER |
---|---|
![]() |
![]() |
So, comments are not removed, indent is respected (including tabs or not), and long lines wrap like you'd expect.
This is great. Thanks!!
Thanks for the PR @ariasmn ! Looking forward to getting this out to everyone 🚀 |
@dimitropoulos @wdawson Thank you so much for the feedback and the fantastic job you do! Glad that I could help 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 LGTM! Works great!
Implementing a specific library for GraphQL formatting was needed to close some issues.
This should close #3242 , which links to three other issues related to GraphQL formatting.