From 1efeded48c86dc05f1aaef592adfadcde491a431 Mon Sep 17 00:00:00 2001 From: spetrunin Date: Thu, 30 Oct 2025 22:45:54 +0200 Subject: [PATCH 1/6] fix: update engine version --- router-tests/go.mod | 6 +++--- router-tests/go.sum | 4 ++-- router/go.mod | 2 +- router/go.sum | 4 ++-- .../internal/planningbenchmark/benchmark_test.go | 14 +++++++++----- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/router-tests/go.mod b/router-tests/go.mod index 418a321fa8..6f5e483d8c 100644 --- a/router-tests/go.mod +++ b/router-tests/go.mod @@ -23,11 +23,11 @@ require ( 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-20251029114720-2b84bc4e4e77 + github.com/wundergraph/cosmo/demo v0.0.0-20251030065139-3b15429990ef github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e - github.com/wundergraph/cosmo/router v0.0.0-20251029114720-2b84bc4e4e77 + github.com/wundergraph/cosmo/router v0.0.0-20251030065139-3b15429990ef github.com/wundergraph/cosmo/router-plugin v0.0.0-20250808194725-de123ba1c65e - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 go.opentelemetry.io/otel v1.36.0 go.opentelemetry.io/otel/sdk v1.36.0 go.opentelemetry.io/otel/sdk/metric v1.36.0 diff --git a/router-tests/go.sum b/router-tests/go.sum index ee029ab67c..3a287afb05 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -354,8 +354,8 @@ github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTB github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE= 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.235 h1:GiqY9zm5OR6SElIohw/rzfqejm3R1HjlSbMhbtZ4zWM= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 h1:ygQBfq1BORRAHE+9uhoNz3OYcVOJ2MLJphXcB2yBhkk= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2/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/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= diff --git a/router/go.mod b/router/go.mod index b0337fdf7f..922d05689e 100644 --- a/router/go.mod +++ b/router/go.mod @@ -31,7 +31,7 @@ require ( github.com/tidwall/gjson v1.18.0 github.com/tidwall/sjson v1.2.5 github.com/twmb/franz-go v1.16.1 - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 // Do not upgrade, it renames attributes we rely on go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 go.opentelemetry.io/contrib/propagators/b3 v1.23.0 diff --git a/router/go.sum b/router/go.sum index 06324c9c54..2708706167 100644 --- a/router/go.sum +++ b/router/go.sum @@ -322,8 +322,8 @@ github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/ 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/graphql-go-tools/v2 v2.0.0-rc.235 h1:GiqY9zm5OR6SElIohw/rzfqejm3R1HjlSbMhbtZ4zWM= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 h1:ygQBfq1BORRAHE+9uhoNz3OYcVOJ2MLJphXcB2yBhkk= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= diff --git a/router/internal/planningbenchmark/benchmark_test.go b/router/internal/planningbenchmark/benchmark_test.go index 45dcf70117..9b7c07ed6c 100644 --- a/router/internal/planningbenchmark/benchmark_test.go +++ b/router/internal/planningbenchmark/benchmark_test.go @@ -17,10 +17,12 @@ type BenchmarkConfig struct { OperationPath string `json:"operationPath"` } +const configFileName = "benchmark_config.json" + func TestPlanning(t *testing.T) { - cfgContent, err := os.ReadFile("benchmark_config.json") + cfgContent, err := os.ReadFile(configFileName) if err != nil { - t.Skipf("unable to read benchmark_config.json: %v", err) + t.Skipf("unable to read %s: %v", configFileName, err) } var cfg BenchmarkConfig @@ -38,15 +40,17 @@ func TestPlanning(t *testing.T) { require.NoError(t, err) start := time.Now() - _, err = pl.PlanPreparedOperation(opDoc) + p, err := pl.PlanPreparedOperation(opDoc) require.NoError(t, err) t.Logf("Planning completed in %v", time.Since(start)) + + t.Log(p.PrettyPrint()) } func BenchmarkPlanning(b *testing.B) { - cfgContent, err := os.ReadFile("benchmark_config.json") + cfgContent, err := os.ReadFile(configFileName) if err != nil { - b.Skipf("unable to read benchmark_config.json: %v", err) + b.Skipf("unable to read %s: %v", configFileName, err) } var cfg BenchmarkConfig From d2e5a515d3abf89cd7f386ad478164f139f30996 Mon Sep 17 00:00:00 2001 From: spetrunin Date: Fri, 31 Oct 2025 01:28:46 +0200 Subject: [PATCH 2/6] chore: update engine --- router-tests/go.mod | 2 +- router-tests/go.sum | 1 + router/go.mod | 4 ++-- router/go.sum | 2 -- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/router-tests/go.mod b/router-tests/go.mod index 6f5e483d8c..7310a4024c 100644 --- a/router-tests/go.mod +++ b/router-tests/go.mod @@ -27,7 +27,7 @@ require ( github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e github.com/wundergraph/cosmo/router v0.0.0-20251030065139-3b15429990ef github.com/wundergraph/cosmo/router-plugin v0.0.0-20250808194725-de123ba1c65e - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 go.opentelemetry.io/otel v1.36.0 go.opentelemetry.io/otel/sdk v1.36.0 go.opentelemetry.io/otel/sdk/metric v1.36.0 diff --git a/router-tests/go.sum b/router-tests/go.sum index 3a287afb05..c6594c7def 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -356,6 +356,7 @@ github.com/wundergraph/consul/sdk v0.0.0-20250204115147-ed842a8fd301 h1:EzfKHQoT 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.235.0.20251029232856-ec0d3188ead2 h1:ygQBfq1BORRAHE+9uhoNz3OYcVOJ2MLJphXcB2yBhkk= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9/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/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= diff --git a/router/go.mod b/router/go.mod index 922d05689e..d8cd3197b6 100644 --- a/router/go.mod +++ b/router/go.mod @@ -31,7 +31,7 @@ require ( github.com/tidwall/gjson v1.18.0 github.com/tidwall/sjson v1.2.5 github.com/twmb/franz-go v1.16.1 - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 // Do not upgrade, it renames attributes we rely on go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 go.opentelemetry.io/contrib/propagators/b3 v1.23.0 @@ -194,4 +194,4 @@ replace ( // Remember you can use Go workspaces to avoid using replace directives in multiple go.mod files // Use what is best for your personal workflow. See CONTRIBUTING.md for more information -//replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 +replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 diff --git a/router/go.sum b/router/go.sum index 2708706167..677d0883e1 100644 --- a/router/go.sum +++ b/router/go.sum @@ -322,8 +322,6 @@ github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/ 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/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2 h1:ygQBfq1BORRAHE+9uhoNz3OYcVOJ2MLJphXcB2yBhkk= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= From 94abe35bed9fabeb4ffd9cf52a93625b62931283 Mon Sep 17 00:00:00 2001 From: spetrunin Date: Fri, 31 Oct 2025 01:39:19 +0200 Subject: [PATCH 3/6] fix go mod sum --- router-tests/go.sum | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/router-tests/go.sum b/router-tests/go.sum index c6594c7def..57fb7fe0df 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -354,8 +354,7 @@ github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTB github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE= 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.235.0.20251029232856-ec0d3188ead2 h1:ygQBfq1BORRAHE+9uhoNz3OYcVOJ2MLJphXcB2yBhkk= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251029232856-ec0d3188ead2/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 h1:KfLUC8CJOutACRx4OBV7TyR9kq9+Pj4mQJYoTQAgIvs= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9/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= From 8ed574a0296f3a2c82243518a849983efffd829c Mon Sep 17 00:00:00 2001 From: spetrunin Date: Fri, 31 Oct 2025 01:47:33 +0200 Subject: [PATCH 4/6] fix go mod --- router/go.mod | 2 +- router/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/router/go.mod b/router/go.mod index d8cd3197b6..86bde49f4d 100644 --- a/router/go.mod +++ b/router/go.mod @@ -194,4 +194,4 @@ replace ( // Remember you can use Go workspaces to avoid using replace directives in multiple go.mod files // Use what is best for your personal workflow. See CONTRIBUTING.md for more information -replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 +//replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 diff --git a/router/go.sum b/router/go.sum index 677d0883e1..293c21d36b 100644 --- a/router/go.sum +++ b/router/go.sum @@ -322,6 +322,8 @@ github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/ 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/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 h1:KfLUC8CJOutACRx4OBV7TyR9kq9+Pj4mQJYoTQAgIvs= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= From 2457f4b032959690c8ee21fd28bd766b837874f6 Mon Sep 17 00:00:00 2001 From: spetrunin Date: Fri, 31 Oct 2025 02:43:55 +0200 Subject: [PATCH 5/6] engine release version --- router-tests/go.mod | 6 +++--- router-tests/go.sum | 4 ++-- router/go.mod | 2 +- router/go.sum | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/router-tests/go.mod b/router-tests/go.mod index 7310a4024c..b7b400397f 100644 --- a/router-tests/go.mod +++ b/router-tests/go.mod @@ -23,11 +23,11 @@ require ( 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-20251030065139-3b15429990ef + github.com/wundergraph/cosmo/demo v0.0.0-20251030234733-8ed574a0296f github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects v0.0.0-20250715110703-10f2e5f9c79e - github.com/wundergraph/cosmo/router v0.0.0-20251030065139-3b15429990ef + github.com/wundergraph/cosmo/router v0.0.0-20251030234733-8ed574a0296f github.com/wundergraph/cosmo/router-plugin v0.0.0-20250808194725-de123ba1c65e - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.236 go.opentelemetry.io/otel v1.36.0 go.opentelemetry.io/otel/sdk v1.36.0 go.opentelemetry.io/otel/sdk/metric v1.36.0 diff --git a/router-tests/go.sum b/router-tests/go.sum index 57fb7fe0df..ec1da961cc 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -354,8 +354,8 @@ github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTB github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE= 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.235.0.20251030203801-4ac7de936ae9 h1:KfLUC8CJOutACRx4OBV7TyR9kq9+Pj4mQJYoTQAgIvs= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.236 h1:LpAdwVd8aU1Qy+xFOlj0jB7GMDqM9Ctl/SmgKTqmOH8= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.236/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/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= diff --git a/router/go.mod b/router/go.mod index 86bde49f4d..fc86ebeea9 100644 --- a/router/go.mod +++ b/router/go.mod @@ -31,7 +31,7 @@ require ( github.com/tidwall/gjson v1.18.0 github.com/tidwall/sjson v1.2.5 github.com/twmb/franz-go v1.16.1 - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.236 // Do not upgrade, it renames attributes we rely on go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 go.opentelemetry.io/contrib/propagators/b3 v1.23.0 diff --git a/router/go.sum b/router/go.sum index 293c21d36b..6ab59cd0f5 100644 --- a/router/go.sum +++ b/router/go.sum @@ -322,8 +322,8 @@ github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/ 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/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9 h1:KfLUC8CJOutACRx4OBV7TyR9kq9+Pj4mQJYoTQAgIvs= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.235.0.20251030203801-4ac7de936ae9/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.236 h1:LpAdwVd8aU1Qy+xFOlj0jB7GMDqM9Ctl/SmgKTqmOH8= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.236/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= From 1672056339c014b318491bbb07695135824de4e3 Mon Sep 17 00:00:00 2001 From: spetrunin Date: Fri, 31 Oct 2025 02:58:08 +0200 Subject: [PATCH 6/6] update query plans fixtures --- router-tests/integration_test.go | 4 +-- .../fixtures/query_plans/only_query_plan.json | 28 +++++++-------- .../query_plan_with_trace_no_data.json | 36 +++++++++---------- .../query_plans/response_with_query_plan.json | 28 +++++++-------- ...sponse_with_query_plan_operation_name.json | 28 +++++++-------- ...plan_operation_name_sanitized_no_data.json | 36 +++++++++---------- 6 files changed, 80 insertions(+), 80 deletions(-) diff --git a/router-tests/integration_test.go b/router-tests/integration_test.go index f64a586508..2a6091d3c5 100644 --- a/router-tests/integration_test.go +++ b/router-tests/integration_test.go @@ -665,7 +665,7 @@ func TestPropagateOperationName(t *testing.T) { var req core.GraphQLRequest require.NoError(t, json.Unmarshal(body, &req)) - require.Contains(t, req.Query, "query Requires__mood__1") + require.Contains(t, req.Query, "query Requires__mood__2") r.Body = io.NopCloser(bytes.NewReader(body)) handler.ServeHTTP(w, r) @@ -680,7 +680,7 @@ func TestPropagateOperationName(t *testing.T) { var req core.GraphQLRequest require.NoError(t, json.Unmarshal(body, &req)) - require.Contains(t, req.Query, "query Requires__availability__2") + require.Contains(t, req.Query, "query Requires__availability__1") r.Body = io.NopCloser(bytes.NewReader(body)) handler.ServeHTTP(w, r) diff --git a/router-tests/testdata/fixtures/query_plans/only_query_plan.json b/router-tests/testdata/fixtures/query_plans/only_query_plan.json index aad00a7dc6..7adfa96583 100644 --- a/router-tests/testdata/fixtures/query_plans/only_query_plan.json +++ b/router-tests/testdata/fixtures/query_plans/only_query_plan.json @@ -23,8 +23,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "mood", - "subgraphId": "6", + "subgraphName": "availability", + "subgraphId": "5", "fetchId": 1, "dependsOnFetchIds": [ 0 @@ -36,12 +36,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", + "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "currentMood" + "fieldName": "isAvailable" }, "isUserRequested": false, "dependsOn": [ @@ -65,8 +65,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "availability", - "subgraphId": "5", + "subgraphName": "mood", + "subgraphId": "6", "fetchId": 2, "dependsOnFetchIds": [ 0 @@ -78,12 +78,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", + "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "isAvailable" + "fieldName": "currentMood" }, "isUserRequested": false, "dependsOn": [ @@ -117,7 +117,7 @@ "fetchId": 3, "dependsOnFetchIds": [ 0, - 1 + 2 ], "representations": [ { @@ -142,7 +142,7 @@ "isUserRequested": true, "dependsOn": [ { - "fetchId": 1, + "fetchId": 2, "subgraph": "mood", "coordinate": { "typeName": "Employee", @@ -176,7 +176,7 @@ "fetchId": 4, "dependsOnFetchIds": [ 0, - 2 + 1 ], "representations": [ { @@ -212,7 +212,7 @@ }, { "fetchId": 2, - "subgraph": "availability", + "subgraph": "mood", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -222,7 +222,7 @@ }, { "fetchId": 1, - "subgraph": "mood", + "subgraph": "availability", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -241,7 +241,7 @@ "isRequires": true }, { - "fetchId": 2, + "fetchId": 1, "subgraph": "availability", "coordinate": { "typeName": "Employee", diff --git a/router-tests/testdata/fixtures/query_plans/query_plan_with_trace_no_data.json b/router-tests/testdata/fixtures/query_plans/query_plan_with_trace_no_data.json index 75eb5c87fc..b438fd183d 100644 --- a/router-tests/testdata/fixtures/query_plans/query_plan_with_trace_no_data.json +++ b/router-tests/testdata/fixtures/query_plans/query_plan_with_trace_no_data.json @@ -23,8 +23,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "mood", - "subgraphId": "6", + "subgraphName": "availability", + "subgraphId": "5", "fetchId": 1, "dependsOnFetchIds": [ 0 @@ -36,12 +36,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", + "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "currentMood" + "fieldName": "isAvailable" }, "isUserRequested": false, "dependsOn": [ @@ -65,8 +65,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "availability", - "subgraphId": "5", + "subgraphName": "mood", + "subgraphId": "6", "fetchId": 2, "dependsOnFetchIds": [ 0 @@ -78,12 +78,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", + "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "isAvailable" + "fieldName": "currentMood" }, "isUserRequested": false, "dependsOn": [ @@ -117,7 +117,7 @@ "fetchId": 3, "dependsOnFetchIds": [ 0, - 1 + 2 ], "representations": [ { @@ -142,7 +142,7 @@ "isUserRequested": true, "dependsOn": [ { - "fetchId": 1, + "fetchId": 2, "subgraph": "mood", "coordinate": { "typeName": "Employee", @@ -176,7 +176,7 @@ "fetchId": 4, "dependsOnFetchIds": [ 0, - 2 + 1 ], "representations": [ { @@ -212,7 +212,7 @@ }, { "fetchId": 2, - "subgraph": "availability", + "subgraph": "mood", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -222,7 +222,7 @@ }, { "fetchId": 1, - "subgraph": "mood", + "subgraph": "availability", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -241,7 +241,7 @@ "isRequires": true }, { - "fetchId": 2, + "fetchId": 1, "subgraph": "availability", "coordinate": { "typeName": "Employee", @@ -320,8 +320,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "source_id": "6", - "source_name": "mood" + "source_id": "5", + "source_name": "availability" } }, { @@ -329,8 +329,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "source_id": "5", - "source_name": "availability" + "source_id": "6", + "source_name": "mood" } } ] diff --git a/router-tests/testdata/fixtures/query_plans/response_with_query_plan.json b/router-tests/testdata/fixtures/query_plans/response_with_query_plan.json index b380ebb458..65d638a291 100644 --- a/router-tests/testdata/fixtures/query_plans/response_with_query_plan.json +++ b/router-tests/testdata/fixtures/query_plans/response_with_query_plan.json @@ -41,8 +41,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "mood", - "subgraphId": "6", + "subgraphName": "availability", + "subgraphId": "5", "fetchId": 1, "dependsOnFetchIds": [ 0 @@ -54,12 +54,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", + "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "currentMood" + "fieldName": "isAvailable" }, "isUserRequested": false, "dependsOn": [ @@ -83,8 +83,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "availability", - "subgraphId": "5", + "subgraphName": "mood", + "subgraphId": "6", "fetchId": 2, "dependsOnFetchIds": [ 0 @@ -96,12 +96,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", + "query": "query($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "isAvailable" + "fieldName": "currentMood" }, "isUserRequested": false, "dependsOn": [ @@ -135,7 +135,7 @@ "fetchId": 3, "dependsOnFetchIds": [ 0, - 1 + 2 ], "representations": [ { @@ -160,7 +160,7 @@ "isUserRequested": true, "dependsOn": [ { - "fetchId": 1, + "fetchId": 2, "subgraph": "mood", "coordinate": { "typeName": "Employee", @@ -194,7 +194,7 @@ "fetchId": 4, "dependsOnFetchIds": [ 0, - 2 + 1 ], "representations": [ { @@ -230,7 +230,7 @@ }, { "fetchId": 2, - "subgraph": "availability", + "subgraph": "mood", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -240,7 +240,7 @@ }, { "fetchId": 1, - "subgraph": "mood", + "subgraph": "availability", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -259,7 +259,7 @@ "isRequires": true }, { - "fetchId": 2, + "fetchId": 1, "subgraph": "availability", "coordinate": { "typeName": "Employee", diff --git a/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name.json b/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name.json index 4f3aa3637f..87f03620b5 100644 --- a/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name.json +++ b/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name.json @@ -41,8 +41,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "mood", - "subgraphId": "6", + "subgraphName": "availability", + "subgraphId": "5", "fetchId": 1, "dependsOnFetchIds": [ 0 @@ -54,12 +54,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query Requires__mood__1($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", + "query": "query Requires__availability__1($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "currentMood" + "fieldName": "isAvailable" }, "isUserRequested": false, "dependsOn": [ @@ -83,8 +83,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "availability", - "subgraphId": "5", + "subgraphName": "mood", + "subgraphId": "6", "fetchId": 2, "dependsOnFetchIds": [ 0 @@ -96,12 +96,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query Requires__availability__2($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", + "query": "query Requires__mood__2($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "isAvailable" + "fieldName": "currentMood" }, "isUserRequested": false, "dependsOn": [ @@ -135,7 +135,7 @@ "fetchId": 3, "dependsOnFetchIds": [ 0, - 1 + 2 ], "representations": [ { @@ -160,7 +160,7 @@ "isUserRequested": true, "dependsOn": [ { - "fetchId": 1, + "fetchId": 2, "subgraph": "mood", "coordinate": { "typeName": "Employee", @@ -194,7 +194,7 @@ "fetchId": 4, "dependsOnFetchIds": [ 0, - 2 + 1 ], "representations": [ { @@ -230,7 +230,7 @@ }, { "fetchId": 2, - "subgraph": "availability", + "subgraph": "mood", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -240,7 +240,7 @@ }, { "fetchId": 1, - "subgraph": "mood", + "subgraph": "availability", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -259,7 +259,7 @@ "isRequires": true }, { - "fetchId": 2, + "fetchId": 1, "subgraph": "availability", "coordinate": { "typeName": "Employee", diff --git a/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name_sanitized_no_data.json b/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name_sanitized_no_data.json index 3a3df54648..fd84f0fc15 100644 --- a/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name_sanitized_no_data.json +++ b/router-tests/testdata/fixtures/query_plans/response_with_query_plan_operation_name_sanitized_no_data.json @@ -23,8 +23,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "--_$mo\u0026o-d_-$-_-", - "subgraphId": "6", + "subgraphName": "--_$av_ai-la%bi$lit-y_-$-_-", + "subgraphId": "5", "fetchId": 1, "dependsOnFetchIds": [ 0 @@ -36,12 +36,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query Requires__mo_o_d__1($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", + "query": "query Requires__av_ai_la_bi_lit_y__1($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "currentMood" + "fieldName": "isAvailable" }, "isUserRequested": false, "dependsOn": [ @@ -65,8 +65,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "subgraphName": "--_$av_ai-la%bi$lit-y_-$-_-", - "subgraphId": "5", + "subgraphName": "--_$mo\u0026o-d_-$-_-", + "subgraphId": "6", "fetchId": 2, "dependsOnFetchIds": [ 0 @@ -78,12 +78,12 @@ "fragment": "fragment Key on Employee {\n __typename\n id\n}" } ], - "query": "query Requires__av_ai_la_bi_lit_y__2($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n isAvailable\n }\n }\n}", + "query": "query Requires__mo_o_d__2($representations: [_Any!]!){\n _entities(representations: $representations){\n ... on Employee {\n __typename\n currentMood\n }\n }\n}", "dependencies": [ { "coordinate": { "typeName": "Employee", - "fieldName": "isAvailable" + "fieldName": "currentMood" }, "isUserRequested": false, "dependsOn": [ @@ -117,7 +117,7 @@ "fetchId": 3, "dependsOnFetchIds": [ 0, - 1 + 2 ], "representations": [ { @@ -142,7 +142,7 @@ "isUserRequested": true, "dependsOn": [ { - "fetchId": 1, + "fetchId": 2, "subgraph": "--_$mo\u0026o-d_-$-_-", "coordinate": { "typeName": "Employee", @@ -176,7 +176,7 @@ "fetchId": 4, "dependsOnFetchIds": [ 0, - 2 + 1 ], "representations": [ { @@ -212,7 +212,7 @@ }, { "fetchId": 2, - "subgraph": "--_$av_ai-la%bi$lit-y_-$-_-", + "subgraph": "--_$mo\u0026o-d_-$-_-", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -222,7 +222,7 @@ }, { "fetchId": 1, - "subgraph": "--_$mo\u0026o-d_-$-_-", + "subgraph": "--_$av_ai-la%bi$lit-y_-$-_-", "coordinate": { "typeName": "Consultancy", "fieldName": "lead" @@ -241,7 +241,7 @@ "isRequires": true }, { - "fetchId": 2, + "fetchId": 1, "subgraph": "--_$av_ai-la%bi$lit-y_-$-_-", "coordinate": { "typeName": "Employee", @@ -320,8 +320,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "source_id": "6", - "source_name": "--_$mo\u0026o-d_-$-_-" + "source_id": "5", + "source_name": "--_$av_ai-la%bi$lit-y_-$-_-" } }, { @@ -329,8 +329,8 @@ "fetch": { "kind": "BatchEntity", "path": "products.@.lead", - "source_id": "5", - "source_name": "--_$av_ai-la%bi$lit-y_-$-_-" + "source_id": "6", + "source_name": "--_$mo\u0026o-d_-$-_-" } } ]