Skip to content

Error for utf8 symbols in arguments #135

@arvitaly

Description

@arvitaly

Hello!
When i use the special international symbols (like chinese or russian) in the argument string,
query Q1{ viewer{ cities(first:10, nameContains:"фы世界"){ edges{ node{ name } } } }}
i get the error:

{ "data": null, "errors": [ { "message": "Syntax Error GraphQL request (10:4) Unexpected character \"\u0000\".\n\n 9: }\n10: }}\n ^\n", "locations": [ { "line": 10, "column": 4 } ] } ] }
I think this is because Lexer is counting wrong the length of string. Function len in golang returns the count of symbols, not runes.
bodyLength := len(body)
File: graphql/language/lexer.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions