fix(fusion-composition): createEncapsulateTransform - remove inaccessible fields from root types to fix federation composition conflicts
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to patch `@graphql-mesh/fusion-composition@0.8.31` for the project I'm working on.
<!-- 🔺️🔺️🔺️ PLEASE REPLACE THIS BLOCK with a description of your problem, and any other relevant context 🔺️🔺️🔺️ -->
Here is the diff that solved my problem:
```diff
diff --git a/node_modules/@graphql-mesh/fusion-composition/esm/transforms/encapsulate.js b/node_modules/@graphql-mesh/fusion-composition/esm/transforms/encapsulate.js
index bdc79ec..9bf6a49 100644
--- a/node_modules/@graphql-mesh/fusion-composition/esm/transforms/encapsulate.js
+++ b/node_modules/@graphql-mesh/fusion-composition/esm/transforms/encapsulate.js
@@ -64,7 +64,7 @@ export function createEncapsulateTransform(opts = {}) {
newRootTypes[operationType] = new GraphQLObjectType({
...originalTypeConfig,
fields: {
- ...originalFieldMapWithHidden,
+ // PATCHED: Removed originalFieldMapWithHidden to fix federation composition conflicts
[groupName]: {
type: new GraphQLNonNull(wrappedType),
extensions: {
```
<em>This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).</em>
0 条评论