diff --git a/.trivyignore.yaml b/.trivyignore.yaml index a993cf83c7..bbac2202e2 100644 --- a/.trivyignore.yaml +++ b/.trivyignore.yaml @@ -1,4 +1,3 @@ vulnerabilities: - id: CVE-2026-24051 statement: Intended to be fixed in `ENG-9057`. The vulnerability happens on macOS/Darwin, as most images are used on Linux machines, we're ok with making this compromise. This was discussed with the team and OK'ed. - diff --git a/router-tests/grpc_subgraph_test.go b/router-tests/grpc_subgraph_test.go index 4871423266..54f5f56bcb 100644 --- a/router-tests/grpc_subgraph_test.go +++ b/router-tests/grpc_subgraph_test.go @@ -264,6 +264,11 @@ func TestGRPCSubgraph(t *testing.T) { query: `{ project(id: 2) { id name urgent: topPriorityItem(category: "task") { __typename } nextDeadline: criticalDeadline(withinDays: 10000) { __typename } subsub: subProjects { id name status otherSubs: subProjects { id name } } } }`, expected: `{"data":{"project":{"id":"2","name":"Microservices Revolution","urgent":{"__typename":"Task"},"nextDeadline":{"__typename":"Milestone"},"subsub":[{"id":"4","name":"DevOps Transformation","status":"PLANNING","otherSubs":[{"id":"1","name":"Cloud Migration Overhaul"}]},{"id":"5","name":"Security Overhaul","status":"ON_HOLD","otherSubs":[{"id":"2","name":"Microservices Revolution"}]}]}}}`, }, + { + name: "query project resources with complex types inside inline fragments", + query: `query { projectResources(projectId: "1") { ... on Milestone { id name dependencies { id name } } ... on Task { id name subtasks { id name } } } }`, + expected: `{"data":{"projectResources":[{},{},{},{},{"id":"1","name":"Infrastructure Assessment","dependencies":[]},{"id":"2","name":"Cloud Environment Setup","dependencies":[{"id":"1","name":"Infrastructure Assessment"},{"id":"","name":""}]},{"id":"3","name":"Application Migration","dependencies":[{"id":"2","name":"Cloud Environment Setup"},{"id":"","name":""}]},{"id":"1","name":"Current Infrastructure Audit","subtasks":[{"id":"1a","name":"Server Inventory"},{"id":"1b","name":"Database Inventory"},{"id":"","name":""}]},{"id":"2","name":"Cloud Provider Selection","subtasks":null},{"id":"3","name":"Network Setup","subtasks":[{"id":"3a","name":"VPC Configuration"},{"id":"3b","name":"Security Groups"},{"id":"","name":""}]},{"id":"14","name":"Database Migration","subtasks":[]}]}}`, + }, } testenv.Run(t, &testenv.Config{ RouterConfigJSONTemplate: testenv.ConfigWithGRPCJSONTemplate, diff --git a/router-tests/router_plugin_test.go b/router-tests/router_plugin_test.go index 12e9845b9c..4e873769d7 100644 --- a/router-tests/router_plugin_test.go +++ b/router-tests/router_plugin_test.go @@ -455,6 +455,11 @@ func TestRouterPluginRequests(t *testing.T) { query: `{ project(id: 2) { id name urgent: topPriorityItem(category: "task") { __typename } nextDeadline: criticalDeadline(withinDays: 10000) { __typename } subsub: subProjects { id name status otherSubs: subProjects { id name } } } }`, expected: `{"data":{"project":{"id":"2","name":"Microservices Revolution","urgent":{"__typename":"Task"},"nextDeadline":{"__typename":"Milestone"},"subsub":[{"id":"4","name":"DevOps Transformation","status":"PLANNING","otherSubs":[{"id":"1","name":"Cloud Migration Overhaul"}]},{"id":"5","name":"Security Overhaul","status":"ON_HOLD","otherSubs":[{"id":"2","name":"Microservices Revolution"}]}]}}}`, }, + { + name: "query project resources with complex types inside inline fragments", + query: `query { projectResources(projectId: "1") { ... on Milestone { id name dependencies { id name } } ... on Task { id name subtasks { id name } } } }`, + expected: `{"data":{"projectResources":[{},{},{},{},{"id":"1","name":"Infrastructure Assessment","dependencies":[]},{"id":"2","name":"Cloud Environment Setup","dependencies":[{"id":"1","name":"Infrastructure Assessment"},{"id":"","name":""}]},{"id":"3","name":"Application Migration","dependencies":[{"id":"2","name":"Cloud Environment Setup"},{"id":"","name":""}]},{"id":"1","name":"Current Infrastructure Audit","subtasks":[{"id":"1a","name":"Server Inventory"},{"id":"1b","name":"Database Inventory"},{"id":"","name":""}]},{"id":"2","name":"Cloud Provider Selection","subtasks":null},{"id":"3","name":"Network Setup","subtasks":[{"id":"3a","name":"VPC Configuration"},{"id":"3b","name":"Security Groups"},{"id":"","name":""}]},{"id":"14","name":"Database Migration","subtasks":[]}]}}`, + }, } testenv.Run(t, &testenv.Config{ RouterConfigJSONTemplate: testenv.ConfigWithPluginsJSONTemplate,