public void QueryConnection(BuildQueryOnConnectionLoopDelegate getQuery, GetConnectionFromResponseDelegate getConnection, QueryResponseHandler callback)
        {
            QueryResponse mergedResponse = null;
            QueryRootQuery query = getQuery(null);

            QueryLoop queryLoop = (loop) => {
                Loader.Query(query, (response) => {
                    var error = (ShopifyError) response;
                    if (error != null) {
                        callback(response);
                    } else {
                        if (mergedResponse == null) {
                            mergedResponse = response;
                        } else {
                            MergeConnections(getConnection(mergedResponse.data), getConnection(response.data));
                        }

                        query = getQuery(response);

                        if (query != null) {
                            loop(loop);
                        } else {
                            callback(mergedResponse);
                        }
                    }
                });
            };

            queryLoop(queryLoop);
        }
 public ConnectionQueryInfo(GetConnectionFromResponseDelegate getConnection, BuildQueryOnEdgesNodeDelegate query, string after = null)
 {
     GetConnection = getConnection;
     Query = query;
     After = after;
 }