docs(examples): add embed-objectql — lean @objectstack/objectql/core usage (ADR-0076)#2417
Merged
Conversation
…ctql/core entry (ADR-0076)
A minimal, runnable example (the deferred ADR-0076 P4/P5) showing how a thin host
embeds the ObjectQL engine as a plain library via `@objectstack/objectql/core` —
no kernel, no ObjectQLPlugin, no @objectstack/metadata-protocol. The object is an
ordinary `ObjectSchema.create({...})` (the same shape shipped to a full backend):
one object model, two hosts, only the capability set differs.
Doubles as a CI smoke (examples/* are in `turbo run test`): asserts CRUD
round-trips via the lean entry and that the entry exposes ObjectQL but not
ObjectQLPlugin / ObjectStackProtocolImplementation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…(no release) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A minimal, runnable
examples/embed-objectqlshowing how a thin host embeds the ObjectQL engine as a plain library via@objectstack/objectql/core— no kernel, noObjectQLPlugin, no@objectstack/metadata-protocol.This is the deferred P4/P5 of ADR-0076 (standalone embed example + smoke). It closes the discoverability gap that started this work — without a runnable example, the lean entry is invisible and embedders reach for a raw query builder instead.
Highlights
src/index.ts:new ObjectQL()from@objectstack/objectql/core+InMemoryDriver+ an ordinaryObjectSchema.create({...})+ CRUD.examples/*are inturbo run test): asserts CRUD round-trips via the lean entry, and that the entry exposesObjectQLbut notObjectQLPlugin/ObjectStackProtocolImplementation.Verification
pnpm --filter @objectstack/example-embed-objectql test→ 2/2 pass (engine boots standalone, CRUD round-trips).typecheckclean.Private example package — no changeset/publish.
🤖 Generated with Claude Code