gazuntype / graphQL-client-unity

This repository houses a unitypackage that can be included in your Unity Project to enable it communicate with a graphQL server.
Apache License 2.0
292 stars 50 forks source link

[WebGL] Json.SerializeObject returns empty string #25

Open DefaultV opened 3 years ago

DefaultV commented 3 years ago

Having struggled with exporting to WebGL, I've hit a roadblock with getting the .SetArgs function to work properly for adding arguments to both queries and mutations. In editor, everything works fine, however when exporting to WebGL (with code stripping set to high) I've narrowed the debugging down to the string json = JsonConvert.SerializeObject(inputObject, new EnumInputConverter()); returning an empty string.

I suspect this is not strictly related to this repo but the newtonsoft library in general. However, it would be nice to get some insight. I've tried using a link.xml and different "dont strip this" attributes to no avail. If anyone has an idea what is being stripped here that causes this behaviour, please let me know! (It works with stripping disabled)