-
Notifications
You must be signed in to change notification settings - Fork 85
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
Question: How to convert JSONString to JSON when using SGQLC #148
Comments
yes, you need to declare them as scalars, refer to the built-in such as https://github.com/profusion/sgqlc/blob/master/sgqlc/types/datetime.py do you write this schema manually? If so, just declare a type like that and refer to it. If you don't, if you use schemagen, I'm afraid I don't have any code that will import some extra file and use it (like it does for Relay/Node and DateTime), but it's easy to add and I can do it for you |
@gu3sss ping? do you have more details? |
Am sorry for the delay! I am not using schemagen. I created my own schema mentioned here. |
Are you suggesting me to build a new scalar of type Json just for my code or to contribute back to SGQLC community? |
that can be the case as well, but if you don't want to contribute back you can simply use it in your schema, you declare a class (like those in |
understood! I will give it a shot. thanks! |
@gu3sss any updates on this? |
@barbieri Please close this. I implemented a work around for this. |
I post processed the output I got using graphql. |
Couple of columns in my mysql backend table are of type JSON. When trying to use SGQLC codegen to generate the schema, I see that Sgqlc marked these field with type 'JSONString'. This JSONString displays as String in response obviously and I am expecting the response to be in JSON format. Is this acheivable?
Please refer to the
status_types_for_notification
andemail_ids
fields below.Expected result:
Actual Result:
The text was updated successfully, but these errors were encountered: