"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSubgraphHealth = void 0;
var client_1 = require("@apollo/client");
var getSubgraphHealthQuery_1 = require("../gql/subgraphHealthQueries/getSubgraphHealthQuery");
var _a = process.env.PUBLIC_SUBGRAPH_SUFFIX, PUBLIC_SUBGRAPH_SUFFIX = _a === void 0 ? '' : _a;
var useSubgraphHealth = function (chain) {
    var subgraphName = "sector-fi/".concat(chain).concat(PUBLIC_SUBGRAPH_SUFFIX);
    var query = (0, client_1.useQuery)(getSubgraphHealthQuery_1.GET_SUBGRAPH_HEALTH_QUERY, {
        variables: { subgraphName: subgraphName },
        context: { subgraphHealth: true },
        pollInterval: 20000,
    });
    return query;
};
exports.useSubgraphHealth = useSubgraphHealth;
//# sourceMappingURL=useSubgraphHealth.js.map