Skip to content

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

Closed
@johannpinson

Description

@johannpinson

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions