"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useAdminSubgraph = void 0;
var utils_1 = require("../../utils");
var types_1 = require("../../gql/types");
var useError_1 = require("../useError");
var useAdminSubgraph = function (chain, address) {
    var query = (0, types_1.useIvaultAdminQuery)({
        context: { chain: chain },
        variables: { id: (0, utils_1.getSgId)(address, chain) },
        pollInterval: 20000,
    });
    var error = query.error;
    (0, useError_1.useError)(error);
    return query;
};
exports.useAdminSubgraph = useAdminSubgraph;
//# sourceMappingURL=useAdminSubgraph.js.map