Skip to content

Commit 2bc0326

Browse files
committed
wip: subs v2
1 parent 900d450 commit 2bc0326

50 files changed

Lines changed: 6878 additions & 6485 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/federation/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ require (
1919
github.com/bufbuild/protocompile v0.14.1 // indirect
2020
github.com/buger/jsonparser v1.1.1 // indirect
2121
github.com/cespare/xxhash/v2 v2.3.0 // indirect
22+
github.com/coder/websocket v1.8.14 // indirect
2223
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
2324
github.com/davecgh/go-spew v1.1.1 // indirect
2425
github.com/dlclark/regexp2 v1.11.0 // indirect
@@ -40,6 +41,7 @@ require (
4041
github.com/pkg/errors v0.9.1 // indirect
4142
github.com/pmezard/go-difflib v1.0.0 // indirect
4243
github.com/r3labs/sse/v2 v2.8.1 // indirect
44+
github.com/rs/xid v1.6.0 // indirect
4345
github.com/russross/blackfriday/v2 v2.1.0 // indirect
4446
github.com/sirupsen/logrus v1.9.3 // indirect
4547
github.com/sosodev/duration v1.3.1 // indirect

examples/federation/go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
2020
github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY=
2121
github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic=
2222
github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
23-
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
24-
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
23+
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
24+
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
2525
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
2626
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
2727
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -59,8 +59,7 @@ github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
5959
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
6060
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
6161
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
62-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
63-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
62+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
6463
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U=
6564
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
6665
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
@@ -121,6 +120,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
121120
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
122121
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
123122
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
123+
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
124+
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
124125
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
125126
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
126127
github.com/sebdah/goldie/v2 v2.7.1 h1:PkBHymaYdtvEkZV7TmyqKxdmn5/Vcj+8TpATWZjnG5E=
@@ -154,8 +155,7 @@ github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
154155
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
155156
github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
156157
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
157-
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTBjW+SZK4mhxTTBVpxcqeBgWF1Rfmltbfk=
158-
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE=
158+
github.com/wundergraph/astjson v1.0.0 h1:rETLJuQkMWWW03HCF6WBttEBOu8gi5vznj5KEUPVV2Q=
159159
github.com/wundergraph/astjson v1.0.0/go.mod h1:h12D/dxxnedtLzsKyBLK7/Oe4TAoGpRVC9nDpDrZSWw=
160160
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99 h1:TGXDYfDhwFLFTuNuCwkuqXT5aXGz47zcurXLfTBS9w4=
161161
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99/go.mod h1:fUuOAUAXUFB/mlSkAaImGeE4A841AKR5dTMWhV4ibxI=

execution/engine/config_factory_federation.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,16 @@ func (f *FederationEngineConfigFactory) subscriptionClient(
458458
switch subscriptionType {
459459
case SubscriptionTypeGraphQLTransportWS:
460460
graphqlSubscriptionClient = subscriptionClientFactory.NewSubscriptionClient(
461-
httpClient,
462-
streamingClient,
463461
f.engineCtx,
462+
graphql_datasource.WithUpgradeClient(httpClient),
463+
graphql_datasource.WithStreamingClient(streamingClient),
464464
)
465465
default:
466466
// for compatibility reasons we fall back to graphql-ws protocol
467467
graphqlSubscriptionClient = subscriptionClientFactory.NewSubscriptionClient(
468-
httpClient,
469-
streamingClient,
470468
f.engineCtx,
469+
graphql_datasource.WithUpgradeClient(httpClient),
470+
graphql_datasource.WithStreamingClient(streamingClient),
471471
)
472472
}
473473

execution/engine/engine_config.go

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (d *graphqlDataSourceGenerator) Generate(dsID string, config graphql_dataso
143143
return nil, err
144144
}
145145

146-
return plan.NewDataSourceConfiguration[graphql_datasource.Configuration](
146+
return plan.NewDataSourceConfiguration(
147147
dsID,
148148
factory,
149149
&plan.DataSourceMetadata{
@@ -155,27 +155,16 @@ func (d *graphqlDataSourceGenerator) Generate(dsID string, config graphql_dataso
155155
}
156156

157157
func (d *graphqlDataSourceGenerator) generateSubscriptionClient(httpClient *http.Client, definedOptions *dataSourceGeneratorOptions) (graphql_datasource.GraphQLSubscriptionClient, error) {
158-
var graphqlSubscriptionClient graphql_datasource.GraphQLSubscriptionClient
159-
switch definedOptions.subscriptionType {
160-
case SubscriptionTypeGraphQLTransportWS:
161-
graphqlSubscriptionClient = definedOptions.subscriptionClientFactory.NewSubscriptionClient(
162-
httpClient,
163-
definedOptions.streamingClient,
164-
nil,
165-
)
166-
default:
167-
// for compatibility reasons we fall back to graphql-ws protocol
168-
graphqlSubscriptionClient = definedOptions.subscriptionClientFactory.NewSubscriptionClient(
169-
httpClient,
170-
definedOptions.streamingClient,
171-
nil,
172-
)
173-
}
158+
graphqlSubscriptionClient := definedOptions.subscriptionClientFactory.NewSubscriptionClient(d.engineCtx,
159+
graphql_datasource.WithUpgradeClient(httpClient),
160+
graphql_datasource.WithStreamingClient(definedOptions.streamingClient),
161+
)
174162

175163
ok := graphql_datasource.IsDefaultGraphQLSubscriptionClient(graphqlSubscriptionClient)
176164
if !ok {
177165
return nil, errors.New("invalid subscriptionClient was instantiated")
178166
}
167+
179168
return graphqlSubscriptionClient, nil
180169
}
181170

execution/engine/engine_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,11 @@ func TestGraphqlFieldConfigurationsGenerator_Generate(t *testing.T) {
280280

281281
}
282282

283-
var mockSubscriptionClient = graphqlDataSource.NewGraphQLSubscriptionClient(http.DefaultClient, http.DefaultClient, context.Background())
283+
var mockSubscriptionClient = graphqlDataSource.NewGraphQLSubscriptionClient(context.Background())
284284

285285
type MockSubscriptionClientFactory struct{}
286286

287-
func (m *MockSubscriptionClientFactory) NewSubscriptionClient(httpClient, streamingClient *http.Client, engineCtx context.Context, options ...graphqlDataSource.Options) graphqlDataSource.GraphQLSubscriptionClient {
287+
func (m *MockSubscriptionClientFactory) NewSubscriptionClient(engineCtx context.Context, options ...graphqlDataSource.SubscriptionClientOption) graphqlDataSource.GraphQLSubscriptionClient {
288288
return mockSubscriptionClient
289289
}
290290

execution/engine/execution_engine_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ func mustConfiguration(t *testing.T, input graphql_datasource.ConfigurationInput
5454
func mustFactory(t testing.TB, httpClient *http.Client) plan.PlannerFactory[graphql_datasource.Configuration] {
5555
t.Helper()
5656

57-
factory, err := graphql_datasource.NewFactory(context.Background(), httpClient, graphql_datasource.NewGraphQLSubscriptionClient(httpClient, httpClient, context.Background()))
57+
factory, err := graphql_datasource.NewFactory(context.Background(), httpClient, graphql_datasource.NewGraphQLSubscriptionClient(context.Background(),
58+
graphql_datasource.WithUpgradeClient(httpClient), graphql_datasource.WithStreamingClient(httpClient)))
5859
require.NoError(t, err)
5960

6061
return factory
@@ -6077,10 +6078,9 @@ func newFederationEngineStaticConfig(ctx context.Context, setup *federationtesti
60776078
return
60786079
}
60796080

6080-
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(
6081-
httpclient.DefaultNetHttpClient,
6082-
httpclient.DefaultNetHttpClient,
6083-
ctx,
6081+
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(ctx,
6082+
graphql_datasource.WithUpgradeClient(httpclient.DefaultNetHttpClient),
6083+
graphql_datasource.WithStreamingClient(httpclient.DefaultNetHttpClient),
60846084
)
60856085

60866086
graphqlFactory, err := graphql_datasource.NewFactory(ctx, httpclient.DefaultNetHttpClient, subscriptionClient)

execution/go.mod

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ require (
1414
github.com/sebdah/goldie/v2 v2.7.1
1515
github.com/stretchr/testify v1.11.1
1616
github.com/vektah/gqlparser/v2 v2.5.30
17-
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083
17+
github.com/wundergraph/astjson v1.0.0
1818
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99
1919
github.com/wundergraph/cosmo/router v0.0.0-20251013094319-c611abf26b17
2020
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.231
2121
go.uber.org/atomic v1.11.0
22-
google.golang.org/grpc v1.68.1
22+
google.golang.org/grpc v1.71.0
2323
google.golang.org/protobuf v1.36.9
2424
)
2525

@@ -29,6 +29,7 @@ require (
2929
github.com/bufbuild/protocompile v0.14.1 // indirect
3030
github.com/buger/jsonparser v1.1.1 // indirect
3131
github.com/cespare/xxhash/v2 v2.3.0 // indirect
32+
github.com/coder/websocket v1.8.14 // indirect
3233
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
3334
github.com/davecgh/go-spew v1.1.1 // indirect
3435
github.com/dlclark/regexp2 v1.11.0 // indirect
@@ -41,6 +42,7 @@ require (
4142
github.com/gobwas/httphead v0.1.0 // indirect
4243
github.com/gobwas/pool v0.2.1 // indirect
4344
github.com/golang/protobuf v1.5.4 // indirect
45+
github.com/google/go-cmp v0.7.0 // indirect
4446
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect
4547
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
4648
github.com/hashicorp/go-hclog v1.6.3 // indirect
@@ -65,6 +67,7 @@ require (
6567
github.com/tidwall/pretty v1.2.1 // indirect
6668
github.com/tidwall/sjson v1.2.5 // indirect
6769
github.com/urfave/cli/v2 v2.27.7 // indirect
70+
github.com/wundergraph/go-arena v1.1.0 // indirect
6871
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
6972
go.uber.org/multierr v1.11.0 // indirect
7073
go.uber.org/zap v1.27.0 // indirect

execution/go.sum

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
1818
github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY=
1919
github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic=
2020
github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
21-
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
22-
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
21+
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
2322
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
2423
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
2524
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -60,6 +59,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
6059
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
6160
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
6261
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
62+
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
63+
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
6364
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U=
6465
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
6566
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
@@ -163,18 +164,24 @@ github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
163164
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
164165
github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
165166
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
166-
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTBjW+SZK4mhxTTBVpxcqeBgWF1Rfmltbfk=
167-
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE=
167+
github.com/wundergraph/astjson v1.0.0 h1:rETLJuQkMWWW03HCF6WBttEBOu8gi5vznj5KEUPVV2Q=
168168
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99 h1:TGXDYfDhwFLFTuNuCwkuqXT5aXGz47zcurXLfTBS9w4=
169169
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99/go.mod h1:fUuOAUAXUFB/mlSkAaImGeE4A841AKR5dTMWhV4ibxI=
170170
github.com/wundergraph/cosmo/router v0.0.0-20251013094319-c611abf26b17 h1:GjO2E8LTf3U5JiQJCY4MmlRcAjVt7IvAbWFSgEjQdl8=
171171
github.com/wundergraph/cosmo/router v0.0.0-20251013094319-c611abf26b17/go.mod h1:7kt64e0LOLMBqOzrfu9PuLRn9cVT9YN1Bb3EennVtws=
172+
github.com/wundergraph/go-arena v1.1.0 h1:9+wSRkJAkA2vbYHp6s8tEGhPViRGQNGXqPHT0QzhdIc=
172173
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.231 h1:2C8LNFGs8MtI2yPy2/a2WRf9/X2FoMqXlEJkpTjvsTg=
173174
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.231/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg=
174175
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
175176
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
176177
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
177178
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
179+
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
180+
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
181+
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
182+
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
183+
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
184+
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
178185
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
179186
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
180187
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
@@ -258,8 +265,7 @@ gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0=
258265
gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU=
259266
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI=
260267
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50=
261-
google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0=
262-
google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw=
268+
google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
263269
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
264270
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
265271
gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y=

execution/graphql/result_writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (e *EngineResultWriter) Heartbeat() error {
3939
return nil
4040
}
4141

42-
func (e *EngineResultWriter) Close(_ resolve.SubscriptionCloseKind) {
42+
func (e *EngineResultWriter) Error(_ []byte) {
4343

4444
}
4545

execution/subscription/legacy_handler_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,9 @@ func setupEngineV2(t *testing.T, ctx context.Context, chatServerURL string) (*Ex
567567

568568
engineConf := engine.NewConfiguration(chatSchema)
569569

570-
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(
571-
httpclient.DefaultNetHttpClient,
572-
httpclient.DefaultNetHttpClient,
573-
ctx,
570+
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(ctx,
571+
graphql_datasource.WithUpgradeClient(httpclient.DefaultNetHttpClient),
572+
graphql_datasource.WithStreamingClient(httpclient.DefaultNetHttpClient),
574573
)
575574

576575
factory, err := graphql_datasource.NewFactory(ctx, httpclient.DefaultNetHttpClient, subscriptionClient)

0 commit comments

Comments
 (0)