Add alias and null value#2017
Conversation
Add kitchen sink test case
|
The next step is to get your hand on as much graphql as possible and run --debug-check on it to make sure that it outputs correct code. And look at the output to make sure that it looks good. The bar for announcing a language support is really high. I want to make sure that the first impression is awesome and "it just works". There are a ton of "pretty printers" out there. The reason why prettier is successful is that we spent a huge amount of time getting all the edge cases right. The good news is that GraphQL is simpler so that shouldn't take as long, but just having printed things is not enough. That's just the first step :) |
|
Also don't you need union types? |
|
@vjeux that PR is for the schema language, I'm mostly concerned with the query language at the moment. Is there something in particular I can look at to figure out how to get comments working? |
|
@leebyron if you have a moment, can you check my style preferences in the kitchen sink example? Curious if you have some opinions there. |
|
There seem to be inconsistency between spacing in List and Object literals. It would be helpful to see tests that cover edge cases like when alias is used on a >80c line |
|
@leebyron this is intentionally adding spaces inside Object literals, but not inside List literals, to match the behavior of prettier for JavaScript. |
|
@stubailo There's a setting to tweak that: |
* tag '1.4.4': (421 commits) 1.4.4 1.4.3 Clean up build script, add Babel for docs js bundles (prettier#1970) Check if the next group has comments (prettier#2040) Include typeAnnotation inside of node location (prettier#2039) Fix decorator comments for export class (prettier#2038) Add group around TSMethodSignature (prettier#2037) Do not throw for unprinted comments inside of JSX (prettier#2036) Break decorator before content (prettier#2032) Fix less &:extends when parsed with scss (prettier#2034) Fix parenthesis for call expression inside of member expression inside of new (prettier#2035) Break if string | null (prettier#2028) Only prevent lone `set` if there's no type annotations (prettier#2026) Add semi for functions without body (prettier#2025) Update commands.md Update commands.md Pretty printer commands.js GraphQL: Add support for union types (prettier#2014) Update README for emacs integration link (prettier#2024) Add alias and null value (prettier#2017) ...
Also, this means we pass the kitchen sink test case! 🎉
I think that means the only thing we need to add is comments and we are good to go for an initial release!