Skip to content

Conversation

@nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Feb 8, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for filtering relation/backlink fields by the connected entity’s ID, extending the existing filter→GraphQL translation to map entityId onto toEntityId (relations) or fromEntityId (backlinks). Also updates docs, tests, and the events app with an example route demonstrating the new filtering capability.

Changes:

  • Extend translateFilterToGraphql to support entityId on relation/backlink filters and emit relations vs backlinks appropriately.
  • Add/adjust test coverage for relation/backlink exists and entityId filter translation cases.
  • Document relation/backlink filtering by existence and by connected entity ID; add an events app demo route and a changeset.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/hypergraph/src/utils/translate-filter-to-graphql.ts Adds entityId filter translation and differentiates forward relations vs backlinks in GraphQL filter output.
packages/hypergraph/src/entity/types.ts Extends relation filter typing to accept entityId (string shorthand or object form).
packages/hypergraph/test/utils/translate-filter-to-graphql.test.ts Adds tests for entityId filters on relations and backlinks; updates relation exists typing expectations.
docs/docs/filtering-query-results.md Documents relation/backlink filtering by existence and by connected entity ID.
apps/events/src/schema.ts Adds schemas used to demonstrate backlink filtering (Bounty, PersonBacklink).
apps/events/src/routes/bounties.lazy.tsx New demo route showing entityId filtering on a backlink field.
apps/events/src/routes/__root.tsx Adds navigation link to the new bounties route.
apps/events/src/routeTree.gen.ts Updates generated route tree to include /bounties.
.claude/settings.local.json Expands allowed tooling/devtools permissions.
.changeset/add-entity-id-relation-filter.md Declares a minor version bump for the new filter capability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nikgraf nikgraf merged commit 8478897 into main Feb 8, 2026
6 checks passed
@nikgraf nikgraf deleted the add-entity-id-for-relation-and-backlink branch February 8, 2026 19:31
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