8000 Tags · acdifran/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

v1.1.101

Toggle v1.1.101's commit message
build improvements

v1.1.100

Toggle v1.1.100's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
polygen: pass conv to TPH edge queries (#2)

## Summary - Describe your changes
TPH edge queries panicked on `.All()`. polygen renders three
`Query<Edge>` builders per TPH edge (on the entity, its query and its
client), and they built the wrapper without `conv`:

```go
func (n *Dashboard) QueryCharts() *DashboardChartQuery {
	return &DashboardChartQuery{b: n.QueryChartsPattern()} // conv is nil
}
```

`All`, `AllX`, `First` and `Only` run each row through `polyMap(rows,
wrap.conv)`, so the first row hits a nil func. `Count`, `IDs`, `Exist`
and an empty result never call it, which is why it went unnoticed.
`With<Edge>` already passed `conv`.

`renderEdge` now passes the same `<pattern>Of` converter to all three
builders.

In aries this hits `Dashboard.QueryCharts()` and
`Organization.QueryConnections()`; `Dashboard.charts` reads through
`client.DashboardChart` as a workaround until this ships.

## Issue ticket number and link
None.

## Test Plans
- New `TestTPHEdgeQueriesConvertRows` renders every TPH edge in
`testdata/tph` and checks each query wrapper carries `conv`. It fails on
main (all three `ConnectionQuery` builders) and passes here.
- `go test ./ent/poly/...` passes; `golangci-lint run
./ent/poly/polygen/` reports 0 issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

v1.1.99

Toggle v1.1.99's commit message
privacy tools

v1.1.98

Toggle v1.1.98's commit message
tph updates

v1.1.97

Toggle v1.1.97's commit message
tph updates

v1.1.96

Toggle v1.1.96's commit message
[aries] some poly updates

v1.1.95

Toggle v1.1.95's commit message
update poly graphql

v1.1.94

Toggle v1.1.94's commit message
move softdelete to To edge always to match

v1.1.93

Toggle v1.1.93's commit message
poly preds

v1.1.92

Toggle v1.1.92's commit message
pipe io for atlas

0