-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4866c5d
commit 87c54da
Showing
2 changed files
with
35 additions
and
50 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
packages/graphql-mesh/patches/@graphql-mesh+merger-stitching+0.96.3.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/node_modules/@graphql-mesh/merger-stitching/cjs/index.js b/node_modules/@graphql-mesh/merger-stitching/cjs/index.js | ||
index 381e473..951f14d 100644 | ||
--- a/node_modules/@graphql-mesh/merger-stitching/cjs/index.js | ||
+++ b/node_modules/@graphql-mesh/merger-stitching/cjs/index.js | ||
@@ -1,5 +1,17 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
+function sortKeys(dict) { | ||
+ var sorted = []; | ||
+ for(var key in dict) { | ||
+ sorted[sorted.length] = key; | ||
+ } | ||
+ sorted.sort(); | ||
+ var tempDict = {}; | ||
+ for(var i = 0; i < sorted.length; i++) { | ||
+ tempDict[sorted[i]] = dict[sorted[i]]; | ||
+ } | ||
+ return tempDict; | ||
+} | ||
const stitch_1 = require("@graphql-tools/stitch"); | ||
class StitchingMerger { | ||
constructor(options) { | ||
@@ -42,6 +54,12 @@ class StitchingMerger { | ||
}, | ||
}), | ||
}); | ||
+ | ||
+ // Sort fields alphabetically | ||
+ Object.keys(unifiedSchema._typeMap).forEach((type) => { | ||
+ unifiedSchema._typeMap[type]._fields = sortKeys(unifiedSchema._typeMap[type]._fields); | ||
+ }); | ||
+ | ||
return { | ||
schema: unifiedSchema, | ||
}; |
50 changes: 0 additions & 50 deletions
50
packages/graphql-mesh/patches/@graphql-tools+stitch+9.0.3.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters