Skip to content

Add silo entry query and count endpoints - #73

Merged
samlown merged 1 commit into
mainfrom
feat/silo-query
Oct 1, 2026
Merged

samlown merged 1 commit into
mainfrom
feat/silo-query

Conversation

@samlown

@samlown samlown commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Adds client support for the structured query endpoints introduced in invopop/api#127.

  • Silo().Entries().Query(ctx, *QuerySiloEntries) → GET /silo/v1/entries/query, with schema, filter, order_by, limit, cursor, fields and count. Returns a SiloQueryEntryCollection including the watermark and any notes.
  • Silo().Entries().Count(ctx, *CountSiloEntries) → GET /silo/v1/entries/query/count.

Results reuse SiloEntry, as the API returns the same entry model. Parameters are always URL-encoded, so a filter containing & is never split into stray parameters (which the API now rejects); there's a test for that case.

🤖 Generated with Claude Code

Query and Count wrap the new /silo/v1/entries/query endpoints, which
search silo's eventually consistent read model with a filter expression
over a fixed per-schema vocabulary.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@samlown
samlown requested a lite review from Copilot October 1, 2026 11:01
@samlown
samlown merged commit 76c5514 into main Oct 1, 2026
3 checks passed
@samlown
samlown deleted the feat/silo-query branch October 1, 2026 11:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds client support for Silo structured entry query and count endpoints.

Changes:

  • Adds query/count models and service methods.
  • Encodes request parameters and supports pagination, filtering, ordering, fields, and counts.
  • Adds endpoint and response parsing tests.
File Description
invopop/​silo_query.go Implements query/count models and API methods.
invopop/​silo_query_test.go Tests request encoding and response parsing.
invopop/​helpers_test.go Adds shared schema test data.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants