angee.knowledge_graph_pgvector.schema
GraphQL contributions for the knowledge pgvector plugin.
Two seams onto the knowledge schema, neither editing it:
type_extensions— :class:PageGraphPgvectorExtensionadds arelated_pagesprojection onto knowledge'sPageType(mirrorsiam_integrate_oidc'sOAuthClientOidcExtension). The composer has already folded the type by name, so the extra field reads as native.query— :class:GraphPgvectorQueryadds asemantic_searchroot field that forces this plugin'spgvectorretrieval backend, resolved through the vault's publicretrieval_forseam (so the strategy stays swappable, not hard-wired, and the plugin never touches knowledge's model internals).
Both buckets carry the same parts into public and console, the schema names knowledge exposes PageType on. The provider is a lexical stub today (see :mod:~angee.knowledge_graph_pgvector.retrieval); the GraphQL shape is what a real semantic backend drops into.
PageGraphPgvectorExtension
@strawberry_django.type(Page, name="PageType", extend=True)
class PageGraphPgvectorExtension()Contributes related_pages onto knowledge's PageType.
The projection seam a graph-RAG plugin uses to surface neighbours on the page read. The skeleton returns actor-visible sibling pages in the same vault as a structural placeholder — REBAC row scope is applied (apply_ambient_scope, like PageType.backlinks); a real plugin ranks by embedding distance over the column it adds to knowledge.Page.
related_pages
@strawberry_django.field(only=["vault_id"])
def related_pages() -> list[PageType]Return up to a handful of actor-visible related pages in the same vault.
GraphPgvectorQuery
@strawberry.type
class GraphPgvectorQuery()Semantic content queries this plugin adds to the knowledge surface.
semantic_search
@strawberry.field
def semantic_search(vault: PublicID,
query: str,
first: int = 10) -> list[PageType]Return actor-visible pages in vault semantically matching query.
Unlike knowledge's search_pages (which honours the vault's configured default), this forces the plugin's pgvector backend — resolved through the vault's public :meth:~angee.knowledge.models.Vault.retrieval_for seam, so the plugin selects its strategy by key without reaching into knowledge's model internals. Row scope is the backend's responsibility (apply_ambient_scope). The backend is a lexical stub until embeddings exist.
schemas
GraphQL contributions installed by the knowledge pgvector plugin.