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

Syntax highlighting for new description syntax #17

Closed
kbrandwijk opened this issue Dec 18, 2017 · 2 comments
Closed

Syntax highlighting for new description syntax #17

kbrandwijk opened this issue Dec 18, 2017 · 2 comments

Comments

@kbrandwijk
Copy link

kbrandwijk commented Dec 18, 2017

Hi, the latest GraphQL spec updated the description syntax: graphql/graphql-js#927. This is not supported by the current syntax highlighting. An example:

"""
Description that is

spanning multiple lines
"""
type Test {
   "Field description"
   field: String
}

The current comment element is here: https://github.com/rmosolgo/language-graphql/blob/master/grammars/graphql.json#L162-L169 but for backwards compatibility, I think two new elements (descriptionline and descriptionblock) might be best?

@kbrandwijk kbrandwijk changed the title Syntax highlighting for new comment syntax Syntax highlighting for new description syntax Dec 18, 2017
@rmosolgo
Copy link
Owner

Thanks for opening the issue! Yes, I think you're right that adding new elements would be best. AFAIK, "block strings" (delimited with """) are valid anywhere that a string is allowed, right? So, maybe we should add rules for block strings? (graphql/graphql-spec#327)

@kbrandwijk
Copy link
Author

Yes, but those are two different things. Block strings are allowed for field values (so in input values). This issue is about descriptions, which can be normal strings or block strings.

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

No branches or pull requests

2 participants