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

GraphQL: Markdown descriptions #993

Closed
langpavel opened this issue Sep 18, 2018 · 2 comments · Fixed by #1012
Closed

GraphQL: Markdown descriptions #993

langpavel opened this issue Sep 18, 2018 · 2 comments · Fixed by #1012

Comments

@langpavel
Copy link

This depends on #992

But question is if inline descriptions can be Markdown hiqhlighted, for exampl same code as in #992:

"""
Decimal number serialized as string.

Should match regexp: `/^[+-]?[0-9]+(\.[0-9]+)$/`

Format:
  `<sign>`? `<digit>`+ ( `.` `<digit>`+ )?

Example:
 - `"1000"`
 - `"0.00000001"`
 - `"-10"`
 - `"+1"`

This is invalid:
 - `".01"` *missing preceding zero*
 - `"1,000.00"` *invalid character*
 - `"1e-10"` *exponential form is not allowed*
"""
scalar Decimal

may be rendered similar to this:

"""

Decimal number serialized as string.

Should match regexp: /^[+-]?[0-9]+(\.[0-9]+)$/

Format:
<sign>? <digit>+ ( . <digit>+ )?

Example:

  • "1000"
  • "0.00000001"
  • "-10"
  • "+1"

This is invalid:

  • ".01" missing preceding zero
  • "1,000.00" invalid character
  • "1e-10" exponential form is not allowed
"""
scalar Decimal
@dblessing
Copy link
Collaborator

Is there a spec in GraphQL for this? Should multiline strings like this, that aren't a value for something, always be interpreted as markdown?

BTW, #586 makes more sense after seeing this. I'd like to know more about this, though, before figuring out how to handle it.

@dblessing
Copy link
Collaborator

I found the spec at https://facebook.github.io/graphql/draft/#sec-Descriptions. Perfect!

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

Successfully merging a pull request may close this issue.

2 participants