mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
avoid mutation
This commit is contained in:
parent
4b2699223e
commit
663060e329
1 changed files with 6 additions and 8 deletions
|
|
@ -144,14 +144,12 @@ export const createComposeFederation = (deps: ComposeFederationDeps) =>
|
|||
});
|
||||
|
||||
if (isFederationV2) {
|
||||
const allConflicts = [];
|
||||
|
||||
for (const subgraph of subgraphs) {
|
||||
const conflicts = validateLinkSpecReservedTypes(subgraph.typeDefs);
|
||||
if (conflicts.length > 0) {
|
||||
allConflicts.push({ subgraph: subgraph.name, conflicts });
|
||||
}
|
||||
}
|
||||
const allConflicts = subgraphs
|
||||
.map(subgraph => ({
|
||||
subgraph: subgraph.name,
|
||||
conflicts: validateLinkSpecReservedTypes(subgraph.typeDefs),
|
||||
}))
|
||||
.filter(({ conflicts }) => conflicts.length > 0);
|
||||
|
||||
if (allConflicts.length > 0) {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue