Q: How does Graphcool deal with unicode characters...
# prisma-whats-new
a
Q: How does Graphcool deal with unicode characters?
1
I have a mutation that includes a field:
"description": "冰封俠: 重生之門"
and it throws an error. Do I need to do some preprocessing, unicode escaping, anything like that?
I'm using
isomorphic-fetch
in the client. The query works in the Playground
n
what error is thrown?
a
I'm sorry, after further debugging it turned out to be another field in the record throwing an error. The value contains
"
. The normal
"
are already escaped to post, how to deal with this?
n
what do you mean with the last sentence?
what client are you using?
a
I mean the value of a field contains an escaped double quote.
isomorphic-fetch
n
you can compare the cURLs from the playground and your fetch request
👍🏻 1
I'd use GraphQL variables
a
Can I, with
iso-fetch
?
n
yup one moment
Was just posted today on SO 🙂
a
Great! I see the Playground escapes the
\
part of the escaped
"
, so
"This is a \"special\" title"
becomes
"This is a \\\"special\\\" title"
👍 1
Ah, apparently that's what my/your code is already doing, I just wasn't using variables in my query
I'll try if that works.
n
this is a benefit of using variables
didn't know that the playground does that for you
in cases like this I like to inspect the cURL
no fancy stuff around that's distracting
a
How?
n
just speaking in general here
a
Because you said before, inspect cURL from the Playground.
n
Oh using the network tab
👍🏻 1
now I'm confused 😅
a
The generated client code in the playground does not include the variables by the way 😞
So I hoped to test it like that, but does not work
known issue, or create a new one? api or console?
👍 1