Add silo entry query and count endpoints - #73
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds client support for the structured query endpoints introduced in invopop/api#127.
Silo().Entries().Query(ctx, *QuerySiloEntries)→GET /silo/v1/entries/query, withschema,filter,order_by,limit,cursor,fieldsandcount. Returns aSiloQueryEntryCollectionincluding thewatermarkand anynotes.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