-
Notifications
You must be signed in to change notification settings - Fork 42
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
schema printer adds unnecessary comma for arguments with description #667
Comments
All multi-line lists get a trailing comma, and description forces an argument decl list to be multi-line. So this is definitely intentional, though perhaps it could be configurable in the future. |
I confirm this was intentional, but it’s a stylistic choice that we can change. I’m not sure it’s worth configuration. It could be a heuristic based on the presence of descriptions (on the argument before and/or after the potential comma) |
Do we do what graphql-js does? I think with printing we should just stick to their format |
Looking for In at least one place it chooses either commas OR newlines: let argsLine = prefix + wrap('(', join(args, ', '), ')');
if (argsLine.length > MAX_LINE_LENGTH) {
argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)');
} |
Description
Schema printer adds unnecessary comma for arguments with description. See repro below.
Steps to reproduce
Expected result
No comma after single argument with description
Actual result
Extra comma after single argument
Environment
zsh
apollo-rs
crate:mut
branch1.72.0
The text was updated successfully, but these errors were encountered: