UNPKG

alinea

Version:
29 lines (27 loc) 602 B
import "../chunks/chunk-NZLE2WMY.js"; // src/core/Graph.ts var Graph = class { find(query) { return this.resolve(query); } first(query) { return this.resolve({ ...query, first: true }); } async get(query) { const result = await this.resolve({ ...query, get: true }); if (!result) throw new Error("Entry not found"); return result; } count(query) { return this.resolve({ ...query, count: true }); } }; function querySource(query) { if (query?.constructor !== Object) return; const related = query.edge; return related; } export { Graph, querySource };