-
Notifications
You must be signed in to change notification settings - Fork 666
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
Character escaping problem #873
Comments
Are you referring to: And what version of Apollo are you using? Try to use the latest snapshot version, as it has support of Map serialization (sort of what you need if you replace |
Now I'm using the Snapshot version
|
Sorry, but why
If you need to serialize object then it must be represented as GraphQL Object type in the schema. Or your server should accept |
The use case is the implementation of generic mutations where a parameter could contain various object structures. One solution is to provide a scalar JSON type. An working example of the mutation request body, supported by the JavaScript Apollo Client , where the value of the parameters is passed a JavaScript object literal: Can this be reproduced in this library? A more type-centric solution is union types which is being discussed in an RFC. |
Current implementation allows Map to be serialized as JSON string value, with this changes we introduce new CustomTypeValue type that will allow Map to be serialized as regular JSON object. Closes apollographql#873
Current implementation allows Map to be serialized as JSON string value, with this changes we introduce new CustomTypeValue type that will allow Map to be serialized as regular JSON object. Closes apollographql#873
Current implementation allows Map to be serialized as JSON string value, with this changes we introduce new CustomTypeValue type that will allow Map to be serialized as regular JSON object. Closes #873
Currently, we're trying to call a mutation which has a JSON parameter. We've already managed to send the request but the JSON parameter wasn't escaped correctly and our backend is not able to parse it correctly.
We intercepted the request with the OkHttpClient object:
Header:
Data:
Is there any chance to replace the
\"
with"
? Why is it escaped in this way?Related code snippets:
Thanks in advance,
Balazs
The text was updated successfully, but these errors were encountered: