Skip to content
Open
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
46535c6
chore: increase defaults for connection config
jensneuse Oct 22, 2025
4ac65d0
chore: update to new Loader interface
jensneuse Oct 22, 2025
f187269
chore: remove singleflight from http transport
jensneuse Oct 22, 2025
5f4f1df
chore: update astjson api
jensneuse Oct 22, 2025
49784dc
chore: update resolve.Request.ID
jensneuse Oct 22, 2025
c2f78ba
chore: add method to header propagation to build headers for Subgraphs
jensneuse Oct 22, 2025
d64188b
chore: add request specific cache for headers built by BuildRequestHe…
jensneuse Oct 23, 2025
3940b43
chore: adapt updated DataSource interface with headers
jensneuse Oct 23, 2025
7dcb585
chore: simplify header propagation
jensneuse Oct 24, 2025
ace6fa0
chore: remove UniqueID from data sources (obsolete)
jensneuse Oct 24, 2025
182e8e5
chore: less printing in test
jensneuse Oct 24, 2025
fb87892
chore:update idle conn defaults
jensneuse Oct 24, 2025
e711947
chore: simplify header propagation
jensneuse Oct 24, 2025
6550fc6
chore: silence logger if closing an already closed server in tests
jensneuse Oct 24, 2025
699ee08
chore: update tracing fixture
jensneuse Oct 24, 2025
96744d2
chore: update config for request deduplication
jensneuse Oct 25, 2025
9b49a8d
chore: add comprehensive single flight tests & fix ws implementation
jensneuse Oct 25, 2025
8cca441
Merge branch 'refs/heads/main' into feat/improve-memory-management
jensneuse Oct 25, 2025
8c3efbb
chore: update configs
jensneuse Oct 25, 2025
ab5e29f
chore: cleanup
jensneuse Oct 27, 2025
ccafc9e
chore: add variables hash
jensneuse Oct 28, 2025
994ccf4
chore: add config for inbound request deduplication
jensneuse Oct 28, 2025
5c1c4ce
chore: add more tests for single flight
jensneuse Oct 28, 2025
344fde4
chore: improve hashing for subgraph headers
jensneuse Oct 28, 2025
f73a0ef
Merge branch 'main' into feat/improve-memory-management
jensneuse Oct 28, 2025
2db09fd
chore: update config fixtures
jensneuse Oct 28, 2025
510a142
chore: simplify NormalizeVariables
jensneuse Oct 29, 2025
a059865
chore: simplify json unmarshal
jensneuse Oct 29, 2025
86eb29a
Merge branch 'refs/heads/main' into feat/improve-memory-management
jensneuse Nov 14, 2025
3fd88e0
Merge branch 'refs/heads/main' into feat/improve-memory-management
jensneuse Nov 25, 2025
f207325
Merge branch 'main' into feat/improve-memory-management
jensneuse Nov 26, 2025
c4ae520
chore: merge main
jensneuse Nov 26, 2025
916465b
Merge branch 'main' into feat/improve-memory-management
jensneuse Nov 26, 2025
c0c925f
chore: cleanup
jensneuse Nov 26, 2025
44d022e
chore: address pr feedback
jensneuse Dec 3, 2025
6f4386a
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 3, 2025
b1d3acb
chore: fix lint
jensneuse Dec 3, 2025
7026595
chore: fix tests
jensneuse Dec 3, 2025
5d9090f
chore: fix tests
jensneuse Dec 3, 2025
999c868
chore: fix tests
jensneuse Dec 3, 2025
bcbcb81
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 4, 2025
f201b2c
chore: update go tools & add test for deduplicate attribute
jensneuse Dec 4, 2025
022055c
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 4, 2025
6984392
chore: improve
jensneuse Dec 8, 2025
a2ac0e2
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 8, 2025
48f48dc
chore: reset max conns
jensneuse Dec 12, 2025
b7f857d
chore: handle nil case
jensneuse Dec 12, 2025
82d6683
chore: update go tools
jensneuse Dec 17, 2025
b8647f6
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 17, 2025
9eaf180
chore: update go tools & merge main
jensneuse Dec 17, 2025
086ad19
chore: set deduplication shards to GOMAXPROCS
jensneuse Dec 17, 2025
b6821d2
chore: update fixtures
jensneuse Dec 17, 2025
92c4a7c
chore: create one dedicated http client per host
jensneuse Dec 17, 2025
91fd20b
chore: always use headerPropagationWriter
jensneuse Dec 17, 2025
cb03d76
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 18, 2025
6702744
chore: merge main, cleanup, add test
jensneuse Dec 18, 2025
3d0aadb
chore: fix test
jensneuse Dec 18, 2025
e67bc73
Merge branch 'main' into feat/improve-memory-management
jensneuse Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions demo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ require (
github.com/rs/cors v1.11.0
github.com/vektah/gqlparser/v2 v2.5.30
github.com/wundergraph/cosmo/composition-go v0.0.0-20250820135159-bf8852195d3f
github.com/wundergraph/cosmo/router v0.0.0-20251125205644-175f80c4e6d9
github.com/wundergraph/cosmo/router-tests v0.0.0-20251125205644-175f80c4e6d9
github.com/wundergraph/cosmo/router v0.0.0-20251126113850-ce5751591be9
github.com/wundergraph/cosmo/router-tests v0.0.0-20251126113850-ce5751591be9
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0
go.opentelemetry.io/otel v1.36.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0
Expand Down Expand Up @@ -146,9 +146,10 @@ require (
github.com/urfave/cli/v2 v2.27.7 // indirect
github.com/vbatts/tar-split v0.12.1 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 // indirect
github.com/wundergraph/astjson v1.0.0 // indirect
github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e // indirect
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239 // indirect
github.com/wundergraph/go-arena v1.1.0 // indirect
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239.0.20251126110525-c8b5567a9dd1 // indirect
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
Expand Down
18 changes: 10 additions & 8 deletions demo/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -373,18 +373,20 @@ github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsL
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTBjW+SZK4mhxTTBVpxcqeBgWF1Rfmltbfk=
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE=
github.com/wundergraph/astjson v1.0.0 h1:rETLJuQkMWWW03HCF6WBttEBOu8gi5vznj5KEUPVV2Q=
github.com/wundergraph/astjson v1.0.0/go.mod h1:h12D/dxxnedtLzsKyBLK7/Oe4TAoGpRVC9nDpDrZSWw=
github.com/wundergraph/cosmo/composition-go v0.0.0-20250820135159-bf8852195d3f h1:TjxywtqT+D6Qa/WGg1Vqn4ogT6P7M+iuUxPgDds1/kU=
github.com/wundergraph/cosmo/composition-go v0.0.0-20250820135159-bf8852195d3f/go.mod h1:S3y/4/28Iut0SHMbmfXXa/6qyP55BA2rS4K3VI8A4Pg=
github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e h1:VdJNlsiyWYxJzAD3jEe+DAQdzxkf9btD8qQNYNU+xQU=
github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e/go.mod h1:WZ0yBeaDSGHqDMcQrP1JRYgCj9atF7ORXF8srnd2Sro=
github.com/wundergraph/cosmo/router v0.0.0-20251125205644-175f80c4e6d9 h1:3bbV5IG402Od27mUDrMoLpA3kXdmLxX15CdYU91WECY=
github.com/wundergraph/cosmo/router v0.0.0-20251125205644-175f80c4e6d9/go.mod h1:Xvxq+kCu1SHtaMueH7IK+ARX6+Bf9uKl00CZCl/LoOI=
github.com/wundergraph/cosmo/router-tests v0.0.0-20251125205644-175f80c4e6d9 h1:gdaogSkGxTtZkUjunQ3mHdvTEpPV+fswvrQEOxxKRPA=
github.com/wundergraph/cosmo/router-tests v0.0.0-20251125205644-175f80c4e6d9/go.mod h1:KVSvF1ivyKqmy+3TGl8QoI+sUWwZswcqXjZtApszpzA=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239 h1:wh8qTtVS4Wr/dJ/s162hAvCPsaZ1VOdmmg82QhNcGBE=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239/go.mod h1:mX25ASEQiKamxaFSK6NZihh0oDCigIuzro30up4mFH4=
github.com/wundergraph/cosmo/router v0.0.0-20251126113850-ce5751591be9 h1:nfdYCTux8XROt0IVSHcN9t+FtELoC+zhWmZJGw/+SBk=
github.com/wundergraph/cosmo/router v0.0.0-20251126113850-ce5751591be9/go.mod h1:Xvxq+kCu1SHtaMueH7IK+ARX6+Bf9uKl00CZCl/LoOI=
github.com/wundergraph/cosmo/router-tests v0.0.0-20251126113850-ce5751591be9 h1:yPQvqWC6fY1cFyc/fiXf5KwXR9xXjWyfu0QR76cQWx8=
github.com/wundergraph/cosmo/router-tests v0.0.0-20251126113850-ce5751591be9/go.mod h1:w072sJl/2jt4ZgV6rH5iX5xa46o51CbBJF3PvjeCm8I=
github.com/wundergraph/go-arena v1.1.0 h1:9+wSRkJAkA2vbYHp6s8tEGhPViRGQNGXqPHT0QzhdIc=
github.com/wundergraph/go-arena v1.1.0/go.mod h1:ROOysEHWJjLQ8FSfNxZCziagb7Qw2nXY3/vgKRh7eWw=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239.0.20251126110525-c8b5567a9dd1 h1:ILzek5T1ImcrFWs02kWrJ+fFhGnhFdP4yFWPyU6FIzo=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239.0.20251126110525-c8b5567a9dd1/go.mod h1:MFbY0QI8ncF60DHs7yyyiyyhWyld0WE1JokiyTVY8j4=
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4=
Expand Down
4 changes: 2 additions & 2 deletions demo/pkg/subgraphs/mood/subgraph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions router-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ require (
github.com/nats-io/nats.go v1.35.0
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
github.com/redis/go-redis/v9 v9.4.0
github.com/redis/go-redis/v9 v9.7.3
github.com/sebdah/goldie/v2 v2.7.1
github.com/stretchr/testify v1.11.1
github.com/twmb/franz-go v1.16.1
github.com/twmb/franz-go/pkg/kadm v1.11.0
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083
github.com/wundergraph/cosmo/demo v0.0.0-20251030234733-8ed574a0296f
github.com/wundergraph/astjson v1.0.0
github.com/wundergraph/cosmo/demo v0.0.0-20250912064154-106e871ee32e
github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e
github.com/wundergraph/cosmo/router v0.0.0-20251125205644-175f80c4e6d9
github.com/wundergraph/cosmo/router v0.0.0-20251126113850-ce5751591be9
github.com/wundergraph/cosmo/router-plugin v0.0.0-20250808194725-de123ba1c65e
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239.0.20251126110525-c8b5567a9dd1
go.opentelemetry.io/otel v1.36.0
go.opentelemetry.io/otel/sdk v1.36.0
go.opentelemetry.io/otel/sdk/metric v1.36.0
Expand Down Expand Up @@ -151,6 +151,7 @@ require (
github.com/vbatts/tar-split v0.12.1 // indirect
github.com/vektah/gqlparser/v2 v2.5.30 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/wundergraph/go-arena v1.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
Expand Down
14 changes: 8 additions & 6 deletions router-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/r3labs/sse/v2 v2.8.1 h1:lZH+W4XOLIq88U5MIHOsLec7+R62uhz3bIi2yn0Sg8o=
github.com/r3labs/sse/v2 v2.8.1/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktEmkNJ7I=
github.com/redis/go-redis/v9 v9.4.0 h1:Yzoz33UZw9I/mFhx4MNrB6Fk+XHO1VukNcCa1+lwyKk=
github.com/redis/go-redis/v9 v9.4.0/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM=
github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
Expand Down Expand Up @@ -350,12 +350,14 @@ github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsL
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTBjW+SZK4mhxTTBVpxcqeBgWF1Rfmltbfk=
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE=
github.com/wundergraph/astjson v1.0.0 h1:rETLJuQkMWWW03HCF6WBttEBOu8gi5vznj5KEUPVV2Q=
github.com/wundergraph/astjson v1.0.0/go.mod h1:h12D/dxxnedtLzsKyBLK7/Oe4TAoGpRVC9nDpDrZSWw=
github.com/wundergraph/consul/sdk v0.0.0-20250204115147-ed842a8fd301 h1:EzfKHQoTjFDDcgaECCCR2aTePqMu9QBmPbyhqIYOhV0=
github.com/wundergraph/consul/sdk v0.0.0-20250204115147-ed842a8fd301/go.mod h1:wxI0Nak5dI5RvJuzGyiEK4nZj0O9X+Aw6U0tC1wPKq0=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239 h1:wh8qTtVS4Wr/dJ/s162hAvCPsaZ1VOdmmg82QhNcGBE=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239/go.mod h1:mX25ASEQiKamxaFSK6NZihh0oDCigIuzro30up4mFH4=
github.com/wundergraph/go-arena v1.1.0 h1:9+wSRkJAkA2vbYHp6s8tEGhPViRGQNGXqPHT0QzhdIc=
github.com/wundergraph/go-arena v1.1.0/go.mod h1:ROOysEHWJjLQ8FSfNxZCziagb7Qw2nXY3/vgKRh7eWw=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239.0.20251126110525-c8b5567a9dd1 h1:ILzek5T1ImcrFWs02kWrJ+fFhGnhFdP4yFWPyU6FIzo=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.239.0.20251126110525-c8b5567a9dd1/go.mod h1:MFbY0QI8ncF60DHs7yyyiyyhWyld0WE1JokiyTVY8j4=
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4=
Expand Down
1 change: 0 additions & 1 deletion router-tests/http_subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func TestHeartbeats(t *testing.T) {
return
}

fmt.Println(string(line))
messages <- string(line)
}
}()
Expand Down
2 changes: 1 addition & 1 deletion router-tests/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ func TestConcurrentQueriesWithDelay(t *testing.T) {
res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{
Query: query,
})
require.JSONEq(t, fmt.Sprintf(`{"data":{"delay":"%s"}}`, resp), res.Body, "query %d failed", ii)
require.Equal(t, fmt.Sprintf(`{"data":{"delay":"%s"}}`, resp), res.Body, "query %d failed", ii)
}(ii)
}
wg.Wait()
Expand Down
8 changes: 4 additions & 4 deletions router-tests/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4509,7 +4509,7 @@ func TestFlakyPrometheusRouterConnectionMetrics(t *testing.T) {

connectionTotal := metrics[0]

require.Equal(t, 100.0, *connectionTotal.Gauge.Value)
require.Equal(t, float64(1024), *connectionTotal.Gauge.Value)

expected := []*io_prometheus_client.LabelPair{
{
Expand Down Expand Up @@ -4689,7 +4689,7 @@ func TestFlakyPrometheusRouterConnectionMetrics(t *testing.T) {
require.Len(t, metrics, 2)

metricDataPoint1 := metrics[0]
require.Equal(t, 100.0, *metricDataPoint1.Gauge.Value)
require.Equal(t, float64(1024), *metricDataPoint1.Gauge.Value)
expected1 := []*io_prometheus_client.LabelPair{
{
Name: PointerOf("otel_scope_name"),
Expand All @@ -4703,7 +4703,7 @@ func TestFlakyPrometheusRouterConnectionMetrics(t *testing.T) {
require.Equal(t, expected1, metricDataPoint1.Label)

metricDataPoint2 := metrics[1]
require.Equal(t, 100.0, *metricDataPoint2.Gauge.Value)
require.Equal(t, float64(1024), *metricDataPoint2.Gauge.Value)
expected2 := []*io_prometheus_client.LabelPair{
{
Name: PointerOf("otel_scope_name"),
Expand Down Expand Up @@ -4918,7 +4918,7 @@ func TestFlakyPrometheusRouterConnectionMetrics(t *testing.T) {

connectionTotal := metrics[0]

require.Equal(t, 100.0, *connectionTotal.Gauge.Value)
require.Equal(t, float64(1024), *connectionTotal.Gauge.Value)

expected := []*io_prometheus_client.LabelPair{
{
Expand Down
Loading
Loading