encodeToGraphQLSingleQuoted

Escapes a single quoted string. The 2 mandatory characters to be escaped are " and \. For better readability, control codes are also escaped. Although / may be escaped, we leave it as is for better readability.

See https://spec.graphql.org/draft/#sec-String-Value.Escape-Sequences. See https://en.wikipedia.org/wiki/List_of_Unicode_characters#Control_codes