graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.9k stars 840 forks source link

When using multi-byte runes in comments, an error occurs. #699

Open xxlv opened 3 weeks ago

xxlv commented 3 weeks ago

https://github.com/graphql-go/graphql/blob/f2b39caf7c92cab3f3f92726b55f59c74f54cfbc/language/lexer/lexer.go#L132

Should i need update to makeToken(NAME, position, endByte, string(body[position:endByte]))?

When i use

{
f(#ok
a:1)}

Its fine

But change to

{
f(#世界
a:1)}

Got error.

yvz5 commented 6 days ago

I had the same error, created a bug fix for this https://github.com/graphql-go/graphql/pull/702 . pull request is waiting for approval but there are no maintainers active