Skip to content

docs(examples): add embed-objectql — lean @objectstack/objectql/core usage (ADR-0076)#2417

Merged
os-zhuang merged 2 commits into
mainfrom
docs/example-embed-objectql
Jun 28, 2026
Merged

docs(examples): add embed-objectql — lean @objectstack/objectql/core usage (ADR-0076)#2417
os-zhuang merged 2 commits into
mainfrom
docs/example-embed-objectql

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

A minimal, runnable examples/embed-objectql 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.

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

  • ~40-line src/index.ts: new ObjectQL() from @objectstack/objectql/core + InMemoryDriver + an ordinary ObjectSchema.create({...}) + CRUD.
  • The object is the same shape you'd ship to a full backend — one object model, two hosts, only the installed 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.

Verification

  • pnpm --filter @objectstack/example-embed-objectql test → 2/2 pass (engine boots standalone, CRUD round-trips).
  • typecheck clean.

Private example package — no changeset/publish.

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 28, 2026 9:37am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tests tooling size/m labels Jun 28, 2026
…(no release)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit fea3ef2 into main Jun 28, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the docs/example-embed-objectql branch June 28, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant