function aliasTopLevelFields(prefix, document) {
    var _a, _b;
    var transformer = (_a = {},
        _a[graphql.Kind.OPERATION_DEFINITION] = function (def) {
            var selections = def.selectionSet.selections;
            return tslib.__assign(tslib.__assign({}, def), { selectionSet: tslib.__assign(tslib.__assign({}, def.selectionSet), { selections: aliasFieldsInSelection(prefix, selections, document) }) });
        },
        _a);
    return graphql.visit(document, transformer, (_b = {},
        _b[graphql.Kind.DOCUMENT] = ["definitions"],
        _b));
}
/**
 * Adds prefixed aliases to top-level fields of the query.
 *
 * @see aliasFieldsInSelection for implementation details
 */
Adds prefixed aliases to top-level fields of the query.
@see aliasFieldsInSelection for implementation details
Adds prefixed aliases to top - level fields of the query . @see aliasFieldsInSelection for implementation details
function aliasTopLevelFields(prefix, document) {
    var _a, _b;
    var transformer = (_a = {},
        _a[graphql.Kind.OPERATION_DEFINITION] = function (def) {
            var selections = def.selectionSet.selections;
            return tslib.__assign(tslib.__assign({}, def), { selectionSet: tslib.__assign(tslib.__assign({}, def.selectionSet), { selections: aliasFieldsInSelection(prefix, selections, document) }) });
        },
        _a);
    return graphql.visit(document, transformer, (_b = {},
        _b[graphql.Kind.DOCUMENT] = ["definitions"],
        _b));
}
function aliasTopLevelFields ( prefix , document ) { var _a , _b ; var transformer = ( _a = { } , _a [ graphql . Kind . OPERATION_DEFINITION ] = function ( def ) { var selections = def . selectionSet . selections ; return tslib . __assign ( tslib . __assign ( { } , def ) , { selectionSet : tslib . __assign ( tslib . __assign ( { } , def . selectionSet ) , { selections : aliasFieldsInSelection ( prefix , selections , document ) } ) } ) ; } , _a ) ; return graphql . visit ( document , transformer , ( _b = { } , _b [ graphql . Kind . DOCUMENT ] = [ "definitions" ] , _b ) ) ; }
Adds prefixed aliases to top-level fields of the query.
Adds prefixed aliases to top - level fields of the query .