diff --git a/packages/graphql-mesh/patches/@graphql-mesh+merger-stitching+0.96.3.patch b/packages/graphql-mesh/patches/@graphql-mesh+merger-stitching+0.96.3.patch new file mode 100644 index 0000000..a55a65d --- /dev/null +++ b/packages/graphql-mesh/patches/@graphql-mesh+merger-stitching+0.96.3.patch @@ -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, + };