graphql-paper
Version:
A flexible in-memory store based on a GraphQL Schema
17 lines (15 loc) • 455 B
JavaScript
;
var storeTypenamesFromSchema = require('./store-typenames-from-schema.js');
function createDocumentStore(schema) {
const store = {};
if (!schema) {
return store;
}
const typenames = storeTypenamesFromSchema.storeTypenamesFromSchema(schema);
for (const typeName of typenames) {
store[typeName] = [];
}
return store;
}
exports.createDocumentStore = createDocumentStore;
//# sourceMappingURL=create-document-store.js.map