Skip to content
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ac23b65
wip: subs v2
endigma Mar 17, 2026
5d43982
wip: error handling improvements
endigma Mar 17, 2026
a5e12fb
collapse adapter readloop into a handler system instead of channels
endigma Mar 18, 2026
2a3e4f6
add serena config
endigma Mar 23, 2026
4c8ddc3
fix review issues
endigma Mar 23, 2026
e910880
simplify connection and transport construction
endigma Mar 23, 2026
9759685
fix lint issue
endigma Mar 23, 2026
cb2348a
add idle timeout before closing unused connections
endigma Mar 23, 2026
d78d83c
restore backwards compatible errors
endigma Mar 23, 2026
4cc007c
remove unused test helper
endigma Apr 2, 2026
3eb0a1b
remove serena from git
endigma Apr 2, 2026
33bca4c
remove redundant switch in subscription client factory
endigma Apr 2, 2026
e986f34
Fix SSE header apply order
endigma Apr 2, 2026
4fd554f
fix defer
endigma Apr 2, 2026
54060a2
fix timeout default check
endigma Apr 2, 2026
76e9d07
allow pongs during init
endigma Apr 2, 2026
162135c
nil check in withlogger
endigma Apr 2, 2026
914d974
fixup tests to be clearer
endigma Apr 2, 2026
95ea70e
remove finalizer abstraction
endigma Apr 2, 2026
13ccb44
go mod tidy in execution
endigma Apr 2, 2026
9d2cbd1
Error implementation for EngineResultWriter
endigma Apr 8, 2026
825d611
clarify protocol being implemented
endigma Apr 8, 2026
f949b24
clean up timeout default placement
endigma Apr 8, 2026
3879306
renaming message types for clarity, adding doc comments to protocol
endigma Apr 8, 2026
3412101
lighter ints for enums
endigma Apr 8, 2026
fb6d012
use consts directly in map function
endigma Apr 8, 2026
6e167e2
clarify re-export file
endigma Apr 8, 2026
cf2504b
fix toctou race and add a test
endigma Apr 8, 2026
0a28c72
move filter buffer handling inside, use pool
endigma Apr 8, 2026
83073b0
doc comments improvement
endigma Apr 8, 2026
039b62d
clean up complicated 3/4 value returns
endigma Apr 8, 2026
1f492df
resolver method renaming and cleanup
endigma Apr 8, 2026
1336b63
clean up locking a bit
endigma Apr 8, 2026
9ce6cd2
reusable helpers for filtering and snapshotting and getting to make
endigma Apr 8, 2026
6c54a76
more comments, rename misleading resolver field, encapsulate writer
endigma Apr 9, 2026
3e77211
Merge branch 'master' into jesse/eng-8566-new-subscription-client
endigma Apr 9, 2026
7d96ff2
fix gci
endigma Apr 9, 2026
e37eeb1
comments and connection ids
endigma Apr 9, 2026
8ea3957
fix: issue with legacy ws not being pingable
endigma Apr 16, 2026
8367e22
use default error extension config
endigma Apr 16, 2026
8d98128
refactor: rename connectionIDs to connectionIDCounter
endigma Apr 16, 2026
7725628
refactor: unexport protocol types, remove trivial getter
endigma Apr 16, 2026
a198549
docs: fix stale comments on handleTriggerUpdate
endigma Apr 16, 2026
ca18a45
fix: broadcast Source.Start() error to all trigger subscribers
endigma Apr 16, 2026
af90771
fix: broadcast trigger startup errors to all subscribers
endigma Apr 16, 2026
a13b074
chore: Handle WS and invalid transport
endigma Apr 20, 2026
d237e3c
fix(sse): remove SSEMethodAuto
endigma Apr 21, 2026
aef088f
refactor: consolidate defaults to the client
endigma Apr 21, 2026
c5b06d9
refactor: unexport subscription client config
endigma Apr 22, 2026
9c9bb10
docs: Add comment for ErrClientClosed
endigma Apr 22, 2026
f98e29c
sse: simplify line splitting
endigma Apr 22, 2026
7e7d60c
review comments
endigma Apr 22, 2026
03de100
document maps in wstransport
endigma Apr 22, 2026
fd0879f
Merge branch 'master' into jesse/eng-8566-new-subscription-client
endigma Apr 22, 2026
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
.DS_Store
pkg/parser/testdata/lotto.graphql
*node_modules*
*vendor*
*vendor*
.serena
2 changes: 2 additions & 0 deletions examples/federation/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/bufbuild/protocompile v0.14.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.14 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
Expand All @@ -40,6 +41,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/r3labs/sse/v2 v2.8.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sosodev/duration v1.3.1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions examples/federation/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY=
github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic=
github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down Expand Up @@ -59,8 +59,7 @@ github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
Expand Down Expand Up @@ -121,6 +120,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
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=
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sebdah/goldie/v2 v2.7.1 h1:PkBHymaYdtvEkZV7TmyqKxdmn5/Vcj+8TpATWZjnG5E=
Expand Down Expand Up @@ -154,8 +155,7 @@ github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
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-20241020204711-78f240a77c99 h1:TGXDYfDhwFLFTuNuCwkuqXT5aXGz47zcurXLfTBS9w4=
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99/go.mod h1:fUuOAUAXUFB/mlSkAaImGeE4A841AKR5dTMWhV4ibxI=
Expand Down
23 changes: 6 additions & 17 deletions execution/engine/config_factory_federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,25 +451,14 @@ func (f *FederationEngineConfigFactory) graphqlDataSourceFactory() (plan.Planner
func (f *FederationEngineConfigFactory) subscriptionClient(
httpClient *http.Client,
streamingClient *http.Client,
subscriptionType SubscriptionType,
_ SubscriptionType,
subscriptionClientFactory graphql_datasource.GraphQLSubscriptionClientFactory,
) (graphql_datasource.GraphQLSubscriptionClient, error) {
var graphqlSubscriptionClient graphql_datasource.GraphQLSubscriptionClient
switch subscriptionType {
case SubscriptionTypeGraphQLTransportWS:
graphqlSubscriptionClient = subscriptionClientFactory.NewSubscriptionClient(
httpClient,
streamingClient,
f.engineCtx,
)
default:
// for compatibility reasons we fall back to graphql-ws protocol
graphqlSubscriptionClient = subscriptionClientFactory.NewSubscriptionClient(
httpClient,
streamingClient,
f.engineCtx,
)
}
graphqlSubscriptionClient := subscriptionClientFactory.NewSubscriptionClient(
f.engineCtx,
graphql_datasource.WithUpgradeClient(httpClient),
graphql_datasource.WithStreamingClient(streamingClient),
)

ok := graphql_datasource.IsDefaultGraphQLSubscriptionClient(graphqlSubscriptionClient)
if !ok {
Expand Down
23 changes: 6 additions & 17 deletions execution/engine/engine_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (d *graphqlDataSourceGenerator) Generate(dsID string, config graphql_dataso
return nil, err
}

return plan.NewDataSourceConfiguration[graphql_datasource.Configuration](
return plan.NewDataSourceConfiguration(
dsID,
factory,
&plan.DataSourceMetadata{
Expand All @@ -155,27 +155,16 @@ func (d *graphqlDataSourceGenerator) Generate(dsID string, config graphql_dataso
}

func (d *graphqlDataSourceGenerator) generateSubscriptionClient(httpClient *http.Client, definedOptions *dataSourceGeneratorOptions) (graphql_datasource.GraphQLSubscriptionClient, error) {
var graphqlSubscriptionClient graphql_datasource.GraphQLSubscriptionClient
switch definedOptions.subscriptionType {
case SubscriptionTypeGraphQLTransportWS:
graphqlSubscriptionClient = definedOptions.subscriptionClientFactory.NewSubscriptionClient(
httpClient,
definedOptions.streamingClient,
nil,
)
default:
// for compatibility reasons we fall back to graphql-ws protocol
graphqlSubscriptionClient = definedOptions.subscriptionClientFactory.NewSubscriptionClient(
httpClient,
definedOptions.streamingClient,
nil,
)
}
graphqlSubscriptionClient := definedOptions.subscriptionClientFactory.NewSubscriptionClient(d.engineCtx,
graphql_datasource.WithUpgradeClient(httpClient),
graphql_datasource.WithStreamingClient(definedOptions.streamingClient),
)

ok := graphql_datasource.IsDefaultGraphQLSubscriptionClient(graphqlSubscriptionClient)
if !ok {
return nil, errors.New("invalid subscriptionClient was instantiated")
}

return graphqlSubscriptionClient, nil
}

Expand Down
4 changes: 2 additions & 2 deletions execution/engine/engine_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ func TestGraphqlFieldConfigurationsGenerator_Generate(t *testing.T) {

}

var mockSubscriptionClient = graphqlDataSource.NewGraphQLSubscriptionClient(http.DefaultClient, http.DefaultClient, context.Background())
var mockSubscriptionClient = graphqlDataSource.NewGraphQLSubscriptionClient(context.Background())

type MockSubscriptionClientFactory struct{}

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

Expand Down
10 changes: 5 additions & 5 deletions execution/engine/execution_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func mustConfiguration(t *testing.T, input graphql_datasource.ConfigurationInput
func mustFactory(t testing.TB, httpClient *http.Client) plan.PlannerFactory[graphql_datasource.Configuration] {
t.Helper()

factory, err := graphql_datasource.NewFactory(context.Background(), httpClient, graphql_datasource.NewGraphQLSubscriptionClient(httpClient, httpClient, context.Background()))
factory, err := graphql_datasource.NewFactory(context.Background(), httpClient, graphql_datasource.NewGraphQLSubscriptionClient(context.Background(),
graphql_datasource.WithUpgradeClient(httpClient), graphql_datasource.WithStreamingClient(httpClient)))
require.NoError(t, err)

return factory
Expand Down Expand Up @@ -6079,10 +6080,9 @@ func newFederationEngineStaticConfig(ctx context.Context, setup *federationtesti
return
}

subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(
httpclient.DefaultNetHttpClient,
httpclient.DefaultNetHttpClient,
ctx,
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(ctx,
graphql_datasource.WithUpgradeClient(httpclient.DefaultNetHttpClient),
graphql_datasource.WithStreamingClient(httpclient.DefaultNetHttpClient),
)

graphqlFactory, err := graphql_datasource.NewFactory(ctx, httpclient.DefaultNetHttpClient, subscriptionClient)
Expand Down
6 changes: 4 additions & 2 deletions execution/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ require (
github.com/sebdah/goldie/v2 v2.7.1
github.com/stretchr/testify v1.11.1
github.com/vektah/gqlparser/v2 v2.5.30
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083
github.com/wundergraph/astjson v1.0.0
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99
github.com/wundergraph/cosmo/router v0.0.0-20251013094319-c611abf26b17
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.231
go.uber.org/atomic v1.11.0
google.golang.org/grpc v1.68.1
google.golang.org/grpc v1.71.0
google.golang.org/protobuf v1.36.9
)

Expand All @@ -29,6 +29,7 @@ require (
github.com/bufbuild/protocompile v0.14.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.14 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
Expand Down Expand Up @@ -65,6 +66,7 @@ require (
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/urfave/cli/v2 v2.27.7 // indirect
github.com/wundergraph/go-arena v1.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
Expand Down
30 changes: 24 additions & 6 deletions execution/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY=
github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic=
github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand All @@ -44,6 +44,10 @@ github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
Expand Down Expand Up @@ -163,18 +167,32 @@ github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
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-20241020204711-78f240a77c99 h1:TGXDYfDhwFLFTuNuCwkuqXT5aXGz47zcurXLfTBS9w4=
github.com/wundergraph/cosmo/composition-go v0.0.0-20241020204711-78f240a77c99/go.mod h1:fUuOAUAXUFB/mlSkAaImGeE4A841AKR5dTMWhV4ibxI=
github.com/wundergraph/cosmo/router v0.0.0-20251013094319-c611abf26b17 h1:GjO2E8LTf3U5JiQJCY4MmlRcAjVt7IvAbWFSgEjQdl8=
github.com/wundergraph/cosmo/router v0.0.0-20251013094319-c611abf26b17/go.mod h1:7kt64e0LOLMBqOzrfu9PuLRn9cVT9YN1Bb3EennVtws=
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.231 h1:2C8LNFGs8MtI2yPy2/a2WRf9/X2FoMqXlEJkpTjvsTg=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.231/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg=
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/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
Expand Down Expand Up @@ -258,8 +276,8 @@ gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0=
gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50=
google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0=
google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw=
google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y=
Expand Down
5 changes: 3 additions & 2 deletions execution/graphql/result_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ func (e *EngineResultWriter) Heartbeat() error {
return nil
}

func (e *EngineResultWriter) Close(_ resolve.SubscriptionCloseKind) {

func (e *EngineResultWriter) Error(data []byte) {
e.buf.Write(data)
e.Flush()
}

func (e *EngineResultWriter) SetFlushCallback(flushCb func(data []byte)) {
Expand Down
7 changes: 3 additions & 4 deletions execution/subscription/legacy_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,9 @@ func setupEngineV2(t *testing.T, ctx context.Context, chatServerURL string) (*Ex

engineConf := engine.NewConfiguration(chatSchema)

subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(
httpclient.DefaultNetHttpClient,
httpclient.DefaultNetHttpClient,
ctx,
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(ctx,
graphql_datasource.WithUpgradeClient(httpclient.DefaultNetHttpClient),
graphql_datasource.WithStreamingClient(httpclient.DefaultNetHttpClient),
)

factory, err := graphql_datasource.NewFactory(ctx, httpclient.DefaultNetHttpClient, subscriptionClient)
Expand Down
7 changes: 3 additions & 4 deletions execution/subscription/websocket/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,9 @@ func setupExecutorPoolV2(t *testing.T, ctx context.Context, chatServerURL string
engineConf := engine.NewConfiguration(chatSchema)
engineConf.SetWebsocketBeforeStartHook(onBeforeStartHook)

subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(
httpclient.DefaultNetHttpClient,
httpclient.DefaultNetHttpClient,
ctx,
subscriptionClient := graphql_datasource.NewGraphQLSubscriptionClient(ctx,
graphql_datasource.WithUpgradeClient(httpclient.DefaultNetHttpClient),
graphql_datasource.WithStreamingClient(httpclient.DefaultNetHttpClient),
)

factory, err := graphql_datasource.NewFactory(ctx, httpclient.DefaultNetHttpClient, subscriptionClient)
Expand Down
Loading
Loading