-
Notifications
You must be signed in to change notification settings - Fork 86
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
There is no documentation on how to use __json_dump_args__ ? #239
Comments
Hi @sumeet30, can you clarify with a code example and error message? Are you talking about the codegen, generated code, operation execution? What's the transport/endpoint being used... all of those impact, we may need to check if encoding matches content-type, etc |
Hi @barbieri This issue i am facing is with operation execution. I have generate code using Graphql schema file. Now when i am trying to perform operation execution, then the Chinese characters passed as input getting converted to codes. mutation { |
@barbieri Could you please help? |
@sumeet30 I'd recommend you to go with variables, it's not that good to pass the explicit values in your query, as the servers can't cache and so on. So please try with something like below, take a look at https://sgqlc.readthedocs.io/en/latest/sgqlc.types.html#sgqlc.types.Variable https://sgqlc.readthedocs.io/en/latest/sgqlc.endpoint.http.html#synchronous-http-endpoint and https://spec.graphql.org/October2021/#sec-Validation.Variables from sgqlc.types import Variable
my_query = op.create(input=Variable('a'))
endpoint(my_query, variables={'a': {'name': '测试混乱', 'description': 'This is test', 'tags': ['test']}}) This will send your document with The However, what's the error the server is sending? The GraphQL document allows for unicode escaping, see https://spec.graphql.org/October2021/#StringCharacter |
I am facing problem with unicode characters (Like Chinese characters). its not getting converted to proper characters. I have found that we can use json_dump_args to pass ensure_ascii=False. How can i use this? any example will be really helpful?
The text was updated successfully, but these errors were encountered: