Skip to content

[graphiql] Don't render newlines in documentation strings #3155

@leonardehrenfried

Description

@leonardehrenfried

Long documentation strings that contain a newline are rendered as is in GraphiQL. This makes reading them a bit confusing and disjointed.

Doc pane

Screenshot from 2023-04-27 12-39-23

Tooltip

Screenshot from 2023-04-27 12-31-46

In the original schema this looks like this:

    """
    Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East. This can be the
    compass bearing, or the direction towards the next stop or intermediate location.
    """
    heading: Float

I would love it if these doc strings, which in our case can be multiple paragraphs, be treated like markdown. This would mean that a single newline is ignored and a double newline treated as a new paragraph.

Thank you for making this wonderful piece of software.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions