graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.86k stars 838 forks source link

modify making token by byte position, not rune position at readName #605

Open nktks opened 3 years ago

nktks commented 3 years ago

Hi!

I tried to parse SDL with multibyte comment , and failed.

I think, the cause is that the start and end positions of the token created in readName were created as the rune position. If the comment contains a multibyte character string, the start and end of the token shifts from the actual byte position, and it seems that the token is not parsed correctly.

Please review this.

Thanks!

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 92.422% when pulling ea0716e36e25030d955ef78a19c69d8e711e3cf8 on nakatamixi:fix/multi-byte-parse into 8a92e977c10b44499aab9df6783359e2d5345043 on graphql-go:master.