graphql-voyager icon indicating copy to clipboard operation
graphql-voyager copied to clipboard

Markdown table in description not rendered properly

Open sirianni opened this issue 6 years ago • 3 comments

A markdown table is included in a field description is not properly rendered.

image

sirianni avatar Aug 10 '18 14:08 sirianni

@sirianni Does graphiql renders it correctly? Can you please post a simplify sample here?

IvanGoncharov avatar Aug 10 '18 14:08 IvanGoncharov

I don't use graphiql, but GraphQL Playground renders it properly.

Any markdown table will work:

"""
| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |
"""
type Foo {
  bar: String
}
Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

sirianni avatar Aug 10 '18 18:08 sirianni

@sirianni I did a small research and technically tables is not a part of CommonMark specification that referenced by GraphQL specification: http://facebook.github.io/graphql/June2018/#sec-Descriptions

GraphQL descriptions are defined using the Markdown syntax (as specified by CommonMark).

But it looks like tables are supported by GraphiQL and other tools so we will try to support it in the version.

IvanGoncharov avatar Aug 10 '18 20:08 IvanGoncharov