v0.2.0¶
Release Date: 2026-06-07
Overview¶
This release adds a new graphql package providing a typed GraphQL client for the Aha.io GraphQL API.
Highlights¶
- GraphQL Client - New package for executing GraphQL queries against Aha.io's GraphQL API with typed request/response handling
Installation¶
What's New¶
GraphQL Package¶
The new graphql package provides a typed client for Aha.io's GraphQL API:
import "github.com/grokify/aha-go/graphql"
// Create a client
client := graphql.NewClient("mycompany", "your-api-key")
// Search documents
var result graphql.SearchDocumentsResponse
err := client.Query(ctx, graphql.SearchDocumentsQuery, map[string]any{
"query": "onboarding",
"searchableType": []string{"Page"},
}, &result)
// Access results
for _, node := range result.SearchDocuments.Nodes {
fmt.Printf("%s: %s\n", node.Name, node.URL)
}
Features¶
| Feature | Description |
|---|---|
| Client | Configurable subdomain, API key, and HTTP client |
| Query method | Execute GraphQL queries with variables |
| Typed responses | SearchDocumentsResponse, PageResponse, FeatureResponse, RequirementResponse |
| Built-in queries | SearchDocumentsQuery, GetPageQuery, GetFeatureQuery, GetRequirementQuery |
| Testing support | SetEndpoint() method for mock server testing |
| Schema | Full GraphQL schema definition (8937 lines) via introspection |
Predefined Queries¶
// Search documents (pages, features, etc.)
graphql.SearchDocumentsQuery
// Get a page by ID
graphql.GetPageQuery
// Get a feature by ID
graphql.GetFeatureQuery
// Get a requirement by ID
graphql.GetRequirementQuery
Bug Fixes¶
- Resolved golangci-lint errors (G306, G704, G115, dupl, gofmt) across multiple files
- Fixed GraphQL API endpoint to use correct path
/api/v2/graphql
Tests¶
- Comprehensive unit tests for GraphQL client with mock HTTP server
- Integration test for GraphQL introspection API
Documentation¶
- Added UTF8 icons to README Features section for better visual presentation
- Updated README shields and title
Upgrade Notes¶
This is a backward-compatible release. No breaking changes from v0.1.0.