StagedTxs content through Unity

hello everyone,
i am trying to get the staged Txs and read the inner action of each, and using GQL there is query called stagedTxIds that give result as Dictionary, i am trying to parsing it using apiClient.GetObjectAsync , and here what i wrote:

    private async void GetStagedTx()
    {
        var apiClient = Game.Game.instance.ApiClient;

        var query =
                    $@"query {{
                    nodeStatus{{
                        stagedTxIds
                    }}
                }}";
        Dictionary<int,string> StagedTxs = new Dictionary<int,string>();
        var response = await apiClient.GetObjectAsync<Dictionary<int, string>>(query);
        Debug.LogError(response.Count);
    }

the result is null, any idea how to parsing it?
Thanks in advance

@oms (Just for checking) I remember that this issue has been resolved. if so, is there any notable solution for that? (or just a simple flaw like a typo?)

the problem was in the query, and the fix is:
string query = @"{""query"":""query{chainQuery{transactionQuery{stagedTransactions{id}}}}"",""variables"":{}}";

1 Like