@eleven-am/golem-core
v0.7.2
Published
Golem core: datamodel, engine and policy kernel for schema-animated GraphQL backends
Maintainers
Readme
@eleven-am/golem-core
The framework-free core of Golem: datamodel contracts, the operation engine, the policy kernel (row constraints, transactional write verification, field permissions, read masking), the schema builder, and the event machinery.
Install it alongside @eleven-am/golem rather than using it directly. See the full guide.
The public core contracts include:
GolemEngine.relationGroupBy()andRelationGroupByRequestfor configured, bounded forward-to-one dimensions. OrdinarygroupByremains Prisma-shaped;$scoped()covers more complex analytics.GolemSubscriptionOptions/GolemSubscriptionObserverfor bounded local fan-out (64 queued events per subscriber by default) and queue/evaluation/delivery metrics.GolemBatchEventOptionsfor the default 1,000-row/1-MiB top-level batch-event bounds.- Versioned
encodeGolemEventMessage/decodeGolemEventMessagetransport support for BigInt, Decimal, Date, bytes, composite identities, snapshots, and batch envelopes. GolemUpsertGuardmigration artifacts underprisma/; every application must apply the provider migration before startup, because every upsert takes the guard. On PostgreSQL the guard's stripe rows must exist before the first upsert:@eleven-am/golemcreates them at startup, and an application running the engine without it callsprepareUpsertGuard(client, provider, stripes)itself.
Golem supports the postgresql and sqlite datasource providers only; the engine refuses any other.
When field read checks are active, generated scalar/enum outputs are nullable so a per-row mask is GraphQL-valid. Composite primary-key models use nested compound selectors and object event identities. See the root migration guide for codegen and migration steps.
