Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
SetArgs in nested {}

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?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!