Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode character in string experiencing couldNotConvert #312

Closed
tonythebully opened this issue Jul 11, 2018 · 1 comment
Closed

Unicode character in string experiencing couldNotConvert #312

tonythebully opened this issue Jul 11, 2018 · 1 comment

Comments

@tonythebully
Copy link

When trying to perform a fetch that would return a body containing unicode (in this case it is the ' character), the following error occurs:
Apollo.JSONDecodingError.couldNotConvert(value: { deviceName = "tony\U2019s iPhone"; }, to: Swift.String))

Where through graphiql and proxying through Charles, you can see clearly that the value of that variable is correctly parsed:
"metadata": { "deviceName": "tony’s iPhone" },

@tonythebully
Copy link
Author

Solved:
The real cause of this issue was a custom SCALAR type where we were trying to pass a json object, but the parser automatically tries to pass the custom type as a string, causing a parsing error.

Referencing #94, we made some custom parsing rules for my custom type and fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant