-
Notifications
You must be signed in to change notification settings - Fork 42
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
Comments should have no significance to the semantic meaning #69
Comments
I just have to note that this is just a draft specification requirement. So for now, support for this feature can wait a bit. |
Agree that it may wait, but for example HotChocolate and all graphql syntax highlighting plugins I've used already support it. I've started implementing #33, as we might have to just switch to HotChocolate otherwise. As a side note (which may be extracted into a separate issue), the current parsing logic (not the entities) doesn't seem to match the structure of the spec. I don't know if it's due to the historical development reasons, or the GraphQL spec have evolved quite far, but I think it would be great to refactor the parser to match the structure of the specification. For example (as defined in the spec): |
The structure of the parser document is the same, isn't it? |
The current 2018 spec says the same thing about comments, by the way, that they are treated as white space. This seems like an important fix |
Fixed by #105 ? |
Also see #101 (comment) |
Current parser tries to associate comments with the entities by assuming that the comment preceding the definition belongs to that definition.
According to the specification draft:
So we should interpret comments just like the whitespace, skipping them during lex parsing.
This issue relates to #33 as documentation should replace the current comments annotation logic
The text was updated successfully, but these errors were encountered: