Skip to content

feat(channel): graph-rooted Channel model (named graphs)#595

Draft
HexaField wants to merge 1 commit into
devfrom
feat/subject-class-named-graphs
Draft

feat(channel): graph-rooted Channel model (named graphs)#595
HexaField wants to merge 1 commit into
devfrom
feat/subject-class-named-graphs

Conversation

@HexaField

Copy link
Copy Markdown
Contributor

Summary

Marks the Channel model with @Model({ name: "Channel", graph: true }) so each channel instance's triples are stored in an isolated named graph within the perspective's Oxigraph store.

What This Enables

  • Scoped queries: Querying a channel's data only scans its named graph, not the entire perspective
  • Bulk deletion: Removing a channel deletes its entire named graph in one operation
  • Subscription filtering: UI components subscribed to a specific channel's graph won't re-render when unrelated channels change

Change

- @Model({ name: "Channel" })
+ @Model({ name: "Channel", graph: true })

In packages/api/src/channel/index.ts.

Graph IRI Convention

Each channel instance gets a named graph at:

ad4m://graph/<channelBaseExpression>

All triples for that channel (name, description, views, members, etc.) are stored within this graph rather than the perspective's default graph.

Dependencies

Testing

  • TypeScript compilation passes (tsc --noEmit)
  • Existing Flux tests unaffected (graph-rooted is backward-compatible — old data in default graph is still queryable)

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 68cfc5cb-233d-4c13-8654-922c9a46ca8e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/subject-class-named-graphs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify

netlify Bot commented May 6, 2026

Copy link
Copy Markdown

Deploy Preview for fluxsocial-dev failed. Why did it fail? →

Name Link
🔨 Latest commit e20980c
🔍 Latest deploy log https://app.netlify.com/projects/fluxsocial-dev/deploys/69faa5451960b3000899d284

@HexaField HexaField changed the base branch from dev to feat/sparql-1.2-cleanup May 6, 2026 02:20
@HexaField HexaField force-pushed the feat/subject-class-named-graphs branch 3 times, most recently from fbbfbf2 to 91b3e11 Compare May 12, 2026 12:30
@HexaField HexaField force-pushed the feat/subject-class-named-graphs branch from 91b3e11 to 05e826d Compare May 15, 2026 11:10
Mark the Channel model with `@Model({ name: 'Channel', graph: true })`
so each channel instance's triples are stored in an isolated named graph
within the perspective's Oxigraph store.

This depends on the named graphs feature in @coasys/ad4m (the
feat/subject-class-named-graphs branch).
@HexaField HexaField force-pushed the feat/subject-class-named-graphs branch from 05e826d to 1c38694 Compare May 19, 2026 11:18
@HexaField HexaField changed the base branch from feat/sparql-1.2-cleanup to dev May 19, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant