Initial Save

This commit is contained in:
jackbeeby
2025-03-28 12:30:19 +11:00
parent e381994f19
commit d8773925e8
9910 changed files with 982718 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require("graphql");
function forEachField(schema, fn) {
var typeMap = schema.getTypeMap();
Object.keys(typeMap).forEach(function (typeName) {
var type = typeMap[typeName];
// TODO: maybe have an option to include these?
if (!graphql_1.getNamedType(type).name.startsWith('__') &&
type instanceof graphql_1.GraphQLObjectType) {
var fields_1 = type.getFields();
Object.keys(fields_1).forEach(function (fieldName) {
var field = fields_1[fieldName];
fn(field, typeName, fieldName);
});
}
});
}
exports.default = forEachField;
//# sourceMappingURL=forEachField.js.map