Title
a

agartha

06/18/2017, 9:15 PM
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

nilan

06/18/2017, 9:45 PM
what error is thrown?
a

agartha

06/18/2017, 9:54 PM
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

nilan

06/18/2017, 9:56 PM
what do you mean with the last sentence?
what client are you using?
a

agartha

06/18/2017, 9:56 PM
I mean the value of a field contains an escaped double quote.
isomorphic-fetch
n

nilan

06/18/2017, 9:56 PM
you can compare the cURLs from the playground and your fetch request
👍🏻 1
I'd use GraphQL variables
a

agartha

06/18/2017, 9:57 PM
Can I, with
iso-fetch
?
n

nilan

06/18/2017, 9:57 PM
yup one moment
Was just posted today on SO 🙂
a

agartha

06/18/2017, 9:59 PM
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

nilan

06/18/2017, 10:02 PM
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

agartha

06/18/2017, 10:03 PM
How?
n

nilan

06/18/2017, 10:04 PM
just speaking in general here
a

agartha

06/18/2017, 10:05 PM
Because you said before, inspect cURL from the Playground.
n

nilan

06/18/2017, 10:06 PM
Oh using the network tab
👍🏻 1
now I'm confused 😅
a

agartha

06/18/2017, 10:07 PM
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?
Nvm, did one just to be sure: https://github.com/graphcool/console/issues/1137
👍 1