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

language/printer not handle line break for comment inside args #1285

Closed
johannpinson opened this issue Mar 12, 2018 · 1 comment
Closed

language/printer not handle line break for comment inside args #1285

johannpinson opened this issue Mar 12, 2018 · 1 comment

Comments

@johannpinson
Copy link

Hi guys,

I report you a bug find with the graph.cool team and about Prisma cli and the generation of the SDL schema.
You can see the initial discussion here: https://github.com/graphcool/prisma/issues/2047

The bug is about highlighting in VSC (maybe a bug about the GraphQL Syntax plugin), but in fact I see a difference between the function printSchema and print.
The problem is just about a missing line break before a comment when it's about args for a "function"

capture d ecran 2018-03-08 a 17 29 40

If printSchema was fixed previous month (here #1205), the print function not handle correctly comments for function's args:

FieldDefinition: addDescription(
({ name, arguments: args, type, directives }) =>
name +
wrap('(', join(args, ', '), ')') +
': ' +
type +
wrap(' ', join(directives, ' ')),
),

I think it just need so verification so see if the args begins or contains some comments to add a line break.

Thanks for your help!

@leebyron
Copy link
Contributor

Thanks for the report. This is definitely a bug in VCS's syntax highlighter, however I agree that the output of print() could be improved

leebyron added a commit that referenced this issue Mar 29, 2018
Descriptions were not separated on their own lines, which made for technically parseable but hard to read output.

Fixes #1285
leebyron added a commit that referenced this issue Mar 29, 2018
Descriptions were not separated on their own lines, which made for technically parseable but hard to read output.

Fixes #1285
leebyron added a commit that referenced this issue Mar 29, 2018
Descriptions were not separated on their own lines, which made for technically parseable but hard to read output.

Fixes #1285
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