UNPKG

hypertune

Version:

[Hypertune](https://www.hypertune.com/) is the most flexible platform for feature flags, A/B testing, analytics and app configuration. Built with full end-to-end type-safety, Git-style version control and local, synchronous, in-memory flag evaluation. Opt

15 lines 622 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getFieldQueryForPath; const shared_1 = require("../shared"); function getFieldQueryForPath(fragmentDefinitions, query, path) { if (!query || path.length === 0) { return query; } if (path.length < 2) { throw new Error(`Invalid path provided: [${path.join(", ")}]`); } return getFieldQueryForPath(fragmentDefinitions, (0, shared_1.getInlineFragment)(fragmentDefinitions, query[path[0]]).selection[path[1]] .fieldQuery, path.slice(2)); } //# sourceMappingURL=getFieldQueryForPath.js.map