Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions router-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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-20251030234733-8ed574a0296f
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-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
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
Expand Down
4 changes: 2 additions & 2 deletions router-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.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=
Expand Down
4 changes: 2 additions & 2 deletions router-tests/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions router-tests/testdata/fixtures/query_plans/only_query_plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"subgraphName": "mood",
"subgraphId": "6",
"subgraphName": "availability",
"subgraphId": "5",
"fetchId": 1,
"dependsOnFetchIds": [
0
Expand All @@ -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": [
Expand All @@ -65,8 +65,8 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"subgraphName": "availability",
"subgraphId": "5",
"subgraphName": "mood",
"subgraphId": "6",
"fetchId": 2,
"dependsOnFetchIds": [
0
Expand All @@ -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": [
Expand Down Expand Up @@ -117,7 +117,7 @@
"fetchId": 3,
"dependsOnFetchIds": [
0,
1
2
],
"representations": [
{
Expand All @@ -142,7 +142,7 @@
"isUserRequested": true,
"dependsOn": [
{
"fetchId": 1,
"fetchId": 2,
"subgraph": "mood",
"coordinate": {
"typeName": "Employee",
Expand Down Expand Up @@ -176,7 +176,7 @@
"fetchId": 4,
"dependsOnFetchIds": [
0,
2
1
],
"representations": [
{
Expand Down Expand Up @@ -212,7 +212,7 @@
},
{
"fetchId": 2,
"subgraph": "availability",
"subgraph": "mood",
"coordinate": {
"typeName": "Consultancy",
"fieldName": "lead"
Expand All @@ -222,7 +222,7 @@
},
{
"fetchId": 1,
"subgraph": "mood",
"subgraph": "availability",
"coordinate": {
"typeName": "Consultancy",
"fieldName": "lead"
Expand All @@ -241,7 +241,7 @@
"isRequires": true
},
{
"fetchId": 2,
"fetchId": 1,
"subgraph": "availability",
"coordinate": {
"typeName": "Employee",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"subgraphName": "mood",
"subgraphId": "6",
"subgraphName": "availability",
"subgraphId": "5",
"fetchId": 1,
"dependsOnFetchIds": [
0
Expand All @@ -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": [
Expand All @@ -65,8 +65,8 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"subgraphName": "availability",
"subgraphId": "5",
"subgraphName": "mood",
"subgraphId": "6",
"fetchId": 2,
"dependsOnFetchIds": [
0
Expand All @@ -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": [
Expand Down Expand Up @@ -117,7 +117,7 @@
"fetchId": 3,
"dependsOnFetchIds": [
0,
1
2
],
"representations": [
{
Expand All @@ -142,7 +142,7 @@
"isUserRequested": true,
"dependsOn": [
{
"fetchId": 1,
"fetchId": 2,
"subgraph": "mood",
"coordinate": {
"typeName": "Employee",
Expand Down Expand Up @@ -176,7 +176,7 @@
"fetchId": 4,
"dependsOnFetchIds": [
0,
2
1
],
"representations": [
{
Expand Down Expand Up @@ -212,7 +212,7 @@
},
{
"fetchId": 2,
"subgraph": "availability",
"subgraph": "mood",
"coordinate": {
"typeName": "Consultancy",
"fieldName": "lead"
Expand All @@ -222,7 +222,7 @@
},
{
"fetchId": 1,
"subgraph": "mood",
"subgraph": "availability",
"coordinate": {
"typeName": "Consultancy",
"fieldName": "lead"
Expand All @@ -241,7 +241,7 @@
"isRequires": true
},
{
"fetchId": 2,
"fetchId": 1,
"subgraph": "availability",
"coordinate": {
"typeName": "Employee",
Expand Down Expand Up @@ -320,17 +320,17 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"source_id": "6",
"source_name": "mood"
"source_id": "5",
"source_name": "availability"
}
},
{
"kind": "Single",
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"source_id": "5",
"source_name": "availability"
"source_id": "6",
"source_name": "mood"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"subgraphName": "mood",
"subgraphId": "6",
"subgraphName": "availability",
"subgraphId": "5",
"fetchId": 1,
"dependsOnFetchIds": [
0
Expand All @@ -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": [
Expand All @@ -83,8 +83,8 @@
"fetch": {
"kind": "BatchEntity",
"path": "products.@.lead",
"subgraphName": "availability",
"subgraphId": "5",
"subgraphName": "mood",
"subgraphId": "6",
"fetchId": 2,
"dependsOnFetchIds": [
0
Expand All @@ -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": [
Expand Down Expand Up @@ -135,7 +135,7 @@
"fetchId": 3,
"dependsOnFetchIds": [
0,
1
2
],
"representations": [
{
Expand All @@ -160,7 +160,7 @@
"isUserRequested": true,
"dependsOn": [
{
"fetchId": 1,
"fetchId": 2,
"subgraph": "mood",
"coordinate": {
"typeName": "Employee",
Expand Down Expand Up @@ -194,7 +194,7 @@
"fetchId": 4,
"dependsOnFetchIds": [
0,
2
1
],
"representations": [
{
Expand Down Expand Up @@ -230,7 +230,7 @@
},
{
"fetchId": 2,
"subgraph": "availability",
"subgraph": "mood",
"coordinate": {
"typeName": "Consultancy",
"fieldName": "lead"
Expand All @@ -240,7 +240,7 @@
},
{
"fetchId": 1,
"subgraph": "mood",
"subgraph": "availability",
"coordinate": {
"typeName": "Consultancy",
"fieldName": "lead"
Expand All @@ -259,7 +259,7 @@
"isRequires": true
},
{
"fetchId": 2,
"fetchId": 1,
"subgraph": "availability",
"coordinate": {
"typeName": "Employee",
Expand Down
Loading
Loading