feat(example-contact-hub): implement REST CRUD endpoints and ObjectUri retrieval #7

Open
opened 2026-10-27 14:51:19 +00:00 by crapougnax · 0 comments
Owner

Migrated from GitHub https://github.com/Quatrain/Core/issues/34 (opened by @crapougnax on 2026-09-18).

Part of parent story #4.

🎯 Goal

Expose REST CRUD endpoints for contacts and tasks, demonstrating zero-boilerplate routing and ObjectUri resolution.

📋 Specification

  1. Integrate @quatrain/api-server-express with CrudEndpoint(Contact) and CrudEndpoint(TaskItem).
  2. Demonstrate ObjectUri retrieval:
    • Reading contacts/cnt-101 returns record with uri.literal: 'sqlite:contacts/cnt-101'.
    • Filter tasks related to a contact via TaskItem.repository().query(query.filter('contact', contact.uri)).
  3. Provide a configuration toggle demonstrating a seamless 1-line switch to PostgresAdapter without touching any endpoints.
> Migrated from GitHub https://github.com/Quatrain/Core/issues/34 (opened by @crapougnax on 2026-09-18). Part of parent story #4. ### 🎯 Goal Expose REST CRUD endpoints for contacts and tasks, demonstrating zero-boilerplate routing and ObjectUri resolution. ### 📋 Specification 1. Integrate `@quatrain/api-server-express` with `CrudEndpoint(Contact)` and `CrudEndpoint(TaskItem)`. 2. Demonstrate `ObjectUri` retrieval: - Reading `contacts/cnt-101` returns record with `uri.literal: 'sqlite:contacts/cnt-101'`. - Filter tasks related to a contact via `TaskItem.repository().query(query.filter('contact', contact.uri))`. 3. Provide a configuration toggle demonstrating a seamless 1-line switch to `PostgresAdapter` without touching any endpoints.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quatrain/core#7
No description provided.