import { print as origPrint } from "graphql";
import { WeakCache } from "@wry/caches";
var printCache;
export var print = Object.assign(function (ast) {
    var result = printCache.get(ast);
    if (!result) {
        result = origPrint(ast);
        printCache.set(ast, result);
    }
    return result;
}, {
    reset: function () {
        printCache = new WeakCache( /** TODO: decide on a maximum size (will do all max sizes in a combined separate PR) */);
    },
});
print.reset();
//# sourceMappingURL=print.js.map