@graphql-mesh/transform-federation 0.95.8 → 0.95.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -237,6 +237,28 @@ class FederationTransform {
237
237
  },
238
238
  });
239
239
  },
240
+ [utils_2.MapperKind.ENUM_TYPE]: type => new graphql_1.GraphQLEnumType({
241
+ ...type.toConfig(),
242
+ astNode: type.astNode && {
243
+ ...type.astNode,
244
+ directives: type.astNode.directives?.filter(directive => federationDirectives.includes(directive.name.value)),
245
+ },
246
+ extensions: {
247
+ ...type.extensions,
248
+ directives: Object.fromEntries(Object.entries(type.extensions?.directives || {}).filter(([key]) => federationDirectives.includes(key))),
249
+ },
250
+ }),
251
+ [utils_2.MapperKind.ENUM_VALUE]: enumValueConfig => ({
252
+ ...enumValueConfig,
253
+ astNode: enumValueConfig.astNode && {
254
+ ...enumValueConfig.astNode,
255
+ directives: enumValueConfig.astNode.directives?.filter(directive => federationDirectives.includes(directive.name.value)),
256
+ },
257
+ extensions: {
258
+ ...enumValueConfig.extensions,
259
+ directives: Object.fromEntries(Object.entries(enumValueConfig.extensions?.directives || {}).filter(([key]) => federationDirectives.includes(key))),
260
+ },
261
+ }),
240
262
  });
241
263
  }
242
264
  }
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { dset } from 'dset';
2
- import { GraphQLInterfaceType, GraphQLObjectType, GraphQLScalarType, GraphQLUnionType, isObjectType, isSpecifiedScalarType, } from 'graphql';
2
+ import { GraphQLEnumType, GraphQLInterfaceType, GraphQLObjectType, GraphQLScalarType, GraphQLUnionType, isObjectType, isSpecifiedScalarType, } from 'graphql';
3
3
  import { entitiesField, EntityType, serviceField } from '@apollo/subgraph/dist/types.js';
4
4
  import { stringInterpolator } from '@graphql-mesh/string-interpolation';
5
5
  import { loadFromModuleExportExpression } from '@graphql-mesh/utils';
@@ -235,6 +235,28 @@ export default class FederationTransform {
235
235
  },
236
236
  });
237
237
  },
238
+ [MapperKind.ENUM_TYPE]: type => new GraphQLEnumType({
239
+ ...type.toConfig(),
240
+ astNode: type.astNode && {
241
+ ...type.astNode,
242
+ directives: type.astNode.directives?.filter(directive => federationDirectives.includes(directive.name.value)),
243
+ },
244
+ extensions: {
245
+ ...type.extensions,
246
+ directives: Object.fromEntries(Object.entries(type.extensions?.directives || {}).filter(([key]) => federationDirectives.includes(key))),
247
+ },
248
+ }),
249
+ [MapperKind.ENUM_VALUE]: enumValueConfig => ({
250
+ ...enumValueConfig,
251
+ astNode: enumValueConfig.astNode && {
252
+ ...enumValueConfig.astNode,
253
+ directives: enumValueConfig.astNode.directives?.filter(directive => federationDirectives.includes(directive.name.value)),
254
+ },
255
+ extensions: {
256
+ ...enumValueConfig.extensions,
257
+ directives: Object.fromEntries(Object.entries(enumValueConfig.extensions?.directives || {}).filter(([key]) => federationDirectives.includes(key))),
258
+ },
259
+ }),
238
260
  });
239
261
  }
240
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-mesh/transform-federation",
3
- "version": "0.95.8",
3
+ "version": "0.95.9",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@graphql-mesh/types": "^0.95.7",