-
Notifications
You must be signed in to change notification settings - Fork 745
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: Support for multiline strings #1012
GraphQL: Support for multiline strings #1012
Conversation
1e8ece6
to
be24440
Compare
be24440
to
d59a7a2
Compare
@langpavel What do you think of this? It adds support for regular multiline string values, plus markdown descriptions. One note that differs from your example in #993. The first line is not made into a markdown header in this case. That's because the GraphQL lexer simply delegates the text to the Markdown lexer, which would only make the first line a header if it was preceded by some form of Is this acceptable? If this is a surprise for GraphQL users we could potentially inject a preceding |
@dblessing Hi, thank you for your effort! I think that first line can be treated as you did, so it will not break reading so much. It's perfectly fine to left first paragraph as is, you can see that other tooling like |
@langpavel Perfect! I'll take this as-is, then. If you're familiar with GraphQL and multiline strings, would you mind checking that my second example in the samples file is valid? From looking at the multiline spec, I believe it is but I have little real-world experience on GraphQL. |
Yes, it is valid (only not recommended style) |
Only issue I can imagine is with de-indenting strategy in GraphQL
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good first step! 🎉
Thank you @dblessing! I will be very satisfied if this lands soon! :-) |
Thanks @langpavel |
Can I kindly ask you when you plan new release? @dblessing @jneen 🙏 |
Fixes #992 and fixes #993
Adds support for multiline strings for GraphQL and markdown descriptions.
Markdown descriptions are in the GraphQL spec at https://facebook.github.io/graphql/draft/#sec-Descriptions