Skip to content

Commit 412360c

Browse files
authored
Merge branch 'main' into ahmet/mcp-per-tool-scope-extraction
2 parents 0b394fa + 14580e0 commit 412360c

File tree

96 files changed

+3395
-413
lines changed

Some content is hidden

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

96 files changed

+3395
-413
lines changed

.github/workflows/router-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
codecov-token: ${{ secrets.CODECOV_TOKEN }}
202202

203203
integration_test:
204-
runs-on: ubuntu-latest-l
204+
runs-on: ubuntu-latest
205205
timeout-minutes: 30
206206
env:
207207
GOMAXPROCS: 4

cli/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ Binaries are attached to the github release otherwise all images can be found [h
44
All notable changes to this project will be documented in this file.
55
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
66

7+
## [0.112.7](https://github.com/wundergraph/cosmo/compare/wgc@0.112.6...wgc@0.112.7) (2026-04-02)
8+
9+
**Note:** Version bump only for package wgc
10+
11+
## [0.112.6](https://github.com/wundergraph/cosmo/compare/wgc@0.112.5...wgc@0.112.6) (2026-04-01)
12+
13+
**Note:** Version bump only for package wgc
14+
715
## [0.112.5](https://github.com/wundergraph/cosmo/compare/wgc@0.112.4...wgc@0.112.5) (2026-03-27)
816

917
**Note:** Version bump only for package wgc

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wgc",
3-
"version": "0.112.5",
3+
"version": "0.112.7",
44
"description": "The official CLI tool to manage the GraphQL Federation Platform Cosmo",
55
"type": "module",
66
"main": "dist/src/index.js",

composition-go/index.global.js

Lines changed: 143 additions & 142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composition/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Binaries are attached to the github release otherwise all images can be found [h
44
All notable changes to this project will be documented in this file.
55
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
66

7+
# [0.55.0](https://github.com/wundergraph/cosmo/compare/@wundergraph/composition@0.54.1...@wundergraph/composition@0.55.0) (2026-04-02)
8+
9+
### Features
10+
11+
* fix long composition errors ([#2728](https://github.com/wundergraph/cosmo/issues/2728)) ([d376585](https://github.com/wundergraph/cosmo/commit/d37658546d5678e9f5a6e8a386e297a6061c57f6)) (@wilsonrivera)
12+
713
## [0.54.1](https://github.com/wundergraph/cosmo/compare/@wundergraph/composition@0.54.0...@wundergraph/composition@0.54.1) (2026-03-18)
814

915
**Note:** Version bump only for package @wundergraph/composition

composition/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wundergraph/composition",
3-
"version": "0.54.1",
3+
"version": "0.55.0",
44
"author": {
55
"name": "WunderGraph Maintainers",
66
"email": "info@wundergraph.com"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const MAX_RESOLVABILITY_PATH_SIZE: number = 5;

composition/src/resolvability-graph/utils/utils.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from './types/params';
2020
import { type SelectionSetSegments } from './types/types';
2121
import { LITERAL_SPACE, QUOTATION_JOIN } from '../constants/string-constants';
22+
import { MAX_RESOLVABILITY_PATH_SIZE } from '../constants/number-constants';
2223

2324
export type UnresolvableFieldData = {
2425
externalSubgraphNames: Set<SubgraphName>;
@@ -184,12 +185,25 @@ export function generateSharedResolvabilityErrorReasons({
184185
return reasons;
185186
}
186187

187-
export function generateSelectionSetSegments(fieldPath: string): SelectionSetSegments {
188+
export function generateSelectionSetSegments(
189+
fieldPath: string,
190+
limit: number = MAX_RESOLVABILITY_PATH_SIZE,
191+
): SelectionSetSegments {
188192
// Regex is to split on singular periods and not fragments (... on TypeName)
189193
const pathNodes = fieldPath.split(/(?<=\w)\./);
190194
let outputStart = '';
191195
let outputEnd = '';
196+
let shouldTruncate = false;
197+
const truncatedNumber = pathNodes.length - limit * 2;
198+
if (limit > 0 && pathNodes.length > limit * 2 + 1) {
199+
// +1 so we always include the root field as the first selection
200+
shouldTruncate = true;
201+
pathNodes.splice(limit + 1, truncatedNumber - 1);
202+
}
192203
for (let i = 0; i < pathNodes.length; i++) {
204+
if (shouldTruncate && i === limit + 1) {
205+
outputStart += LITERAL_SPACE.repeat(i + 1) + `... # and ${truncatedNumber} truncated selections\n`;
206+
}
193207
outputStart += LITERAL_SPACE.repeat(i + 1) + pathNodes[i] + ` {\n`;
194208
outputEnd = LITERAL_SPACE.repeat(i + 1) + `}\n` + outputEnd;
195209
}

0 commit comments

Comments
 (0)