I have a long query from which I am parsing it to JSON to get individual values. It all works fine. Unfortunately the problem appears when using SetArgs() in a nested {}. For example, here is my query:
{
System(ID: "1") {
model {
type {
SystemModel{
CreationModel(isModelCreated: true) {
name
}
}
}
}
}
}
And here is my Unity code:
public async void GetSystemID () {
//Importing NestedQuery...
...
query.SetArgs (new { ID= "1", isModelCreated = true }); //How do I provide isModelCreated here
UnityWebRequest request = await NestedQuery.Post (query);
JSONNode itemsData = JSON.Parse (request.downloadHandler.text);
var parseJSON = JSON.Parse (request.downloadHandler.text);
}
So in SetArgs, I have to provide a list of arguments, for example ID: "1" and isModelCreated: true. I am able to provide the first argument, but unfortunately the nested query's argument - isModelCreated is not getting recognized as it treats it as:
System(ID: "1", isModelCreated: true) {}
Do I have to add multiple {} so that it comes in right order or is there a cleaner way to achieve this?