Skip to content

feat: add event block and agent GraphQL queries with tests#113

Merged
jfrench9 merged 1 commit intomainfrom
feature/event-block-graphql
May 1, 2026
Merged

feat: add event block and agent GraphQL queries with tests#113
jfrench9 merged 1 commit intomainfrom
feature/event-block-graphql

Conversation

@jfrench9
Copy link
Copy Markdown
Member

@jfrench9 jfrench9 commented May 1, 2026

Summary

Implements GraphQL queries for event blocks and agents in the Ledger client, along with comprehensive test coverage for event block retrieval. This PR introduces the foundational data-fetching layer for interacting with the ledger's event block and agent entities.

Changes

New GraphQL Queries

  • agent.ts – Query for fetching a single agent by identifier
  • agents.ts – Query for fetching a paginated/filtered list of agents
  • eventBlock.ts – Query for fetching a single event block
  • eventBlocks.ts – Query for fetching multiple event blocks with filtering support

Client Layer

  • LedgerClient.ts – Extended with new methods to execute agent and event block queries against the GraphQL API (106 new lines of client logic)

Generated Types

  • graphql.ts – Updated generated GraphQL types to include the new query and response types for agents and event blocks (489 lines of generated schema types)

Tests

  • LedgerClient.test.ts – Added 215 lines of test coverage focused on event block retrieval, including success paths, error handling, and edge cases

Key Details

  • No UI/UX changes – This is a pure data-layer addition with no visual components affected.
  • All new files – The 4 query files are net-new additions; the client, tests, and generated types are modifications to existing files.
  • Total additions: 985 lines, no deletions — this is purely additive.

Breaking Changes

None. This PR only adds new queries and client methods without modifying existing interfaces or behavior.

Testing Notes for Reviewers

  1. Unit tests – Review LedgerClient.test.ts for completeness of scenarios (single fetch, list fetch, error states, empty responses).
  2. GraphQL query structure – Verify that the query fields in agent.ts, agents.ts, eventBlock.ts, and eventBlocks.ts align with the current ledger schema.
  3. Generated types – Confirm graphql.ts was regenerated from the latest schema and that no manual edits were made to the generated file.
  4. Integration consideration – While unit tests are included, reviewers should consider whether integration tests against a staging ledger endpoint are warranted before merging.

Browser Compatibility

No browser compatibility concerns — these changes are entirely server-side/client-layer GraphQL operations with no DOM, CSS, or browser API dependencies.


🤖 Generated with Claude Code

Branch Info:

  • Source: feature/event-block-graphql
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

@jfrench9 jfrench9 merged commit 804505c into main May 1, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/event-block-graphql branch May 1, 2026 19:46
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