Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

124
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda