graphql-core-legacy icon indicating copy to clipboard operation
graphql-core-legacy copied to clipboard

Lex comments

Open schrockn opened this issue 7 years ago • 0 comments

Right now graphql-core in the lex pass completely omits comments. If you want to consume the content of comments in tooling, you are out of the luck.

Python graphql shoudl mimic graphql-js and do this. Lee Byron did this here https://github.com/graphql/graphql-js/commit/165b9d3a0b913d792501b0ce2829ad417d83122d by making the stream of lex tokens a doubly-linked list so you can "peek" backwards and inspect the contents of comments.

I'll submit a pull request at some point to do this but if someone feels like doing it go nuts!

schrockn avatar Jul 11 '17 23:07 schrockn