@graphql-mesh/fusion-composition 0.8.45 → 0.8.46
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.
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createFederationTransform = createFederationTransform;
|
|
4
4
|
const graphql_1 = require("graphql");
|
|
5
|
-
const suggestionList_js_1 = require("graphql/jsutils/suggestionList.js");
|
|
6
5
|
const utils_1 = require("@graphql-tools/utils");
|
|
7
6
|
const federation_utils_js_1 = require("../federation-utils.js");
|
|
7
|
+
const index_js_1 = require("../suggestionList/index.js");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
9
|
const federationDirectiveNames = [
|
|
10
10
|
'key',
|
|
@@ -97,7 +97,7 @@ function createFederationTransform(config) {
|
|
|
97
97
|
}
|
|
98
98
|
const rootTypeFields = rootType.getFields();
|
|
99
99
|
if (!rootTypeFields[targetFieldName]) {
|
|
100
|
-
const suggestions = (0,
|
|
100
|
+
const suggestions = (0, index_js_1.suggestionList)(targetFieldName, Object.keys(rootTypeFields));
|
|
101
101
|
const suggestionStr = suggestions.length
|
|
102
102
|
? ` Did you mean "${suggestions.join(' or ')}"?`
|
|
103
103
|
: '';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DirectiveLocation, getNamedType, GraphQLDirective, GraphQLList, GraphQLNonNull, GraphQLSchema, GraphQLString, OperationTypeNode, } from 'graphql';
|
|
2
|
-
import { suggestionList } from 'graphql/jsutils/suggestionList.js';
|
|
3
2
|
import { asArray, getDefinedRootType, getDirectiveExtensions, getRootTypeMap, MapperKind, mapSchema, } from '@graphql-tools/utils';
|
|
4
3
|
import { addFederation2DirectivesToSubgraph, importFederationDirectives, importMeshDirectives, } from '../federation-utils.js';
|
|
4
|
+
import { suggestionList } from '../suggestionList/index.js';
|
|
5
5
|
import { TransformValidationError } from './utils.js';
|
|
6
6
|
const federationDirectiveNames = [
|
|
7
7
|
'key',
|