You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Faced the same issue in my project. An interesting observation: if you substitute values not directly, but through query variables, then spaces in strings are not cut off
If I have an operation with a string literal input value that has leading or trailing whitespace, such as:
... the string gets trimmed to just
"abcd"
when the operation is parsed.If instead I pass as a variable, then the string is not trimmed.
According to the GraphQL Spec:
Thus I would expect to never have the string input trimmed of whitespace.
I believe this is happening because
lexer.readSingleLineString
is designed to seek out whitespace and exclude it from the string. IMHO it should not.graphql-go-tools/v2/pkg/lexer/lexer.go
Lines 387 to 431 in 6526186
Thanks.
The text was updated successfully, but these errors were encountered: