diff --git a/packages/resolvers-composition/src/resolvers-composition.ts b/packages/resolvers-composition/src/resolvers-composition.ts index a61e42ea26b..ff88bbec07b 100644 --- a/packages/resolvers-composition/src/resolvers-composition.ts +++ b/packages/resolvers-composition/src/resolvers-composition.ts @@ -2,7 +2,7 @@ import { chainFunctions } from './chain-functions'; import _ from 'lodash'; import { GraphQLFieldResolver, GraphQLScalarTypeConfig } from 'graphql'; import { asArray } from '@graphql-tools/utils'; -import { matcher } from 'micromatch'; +import micromatch from 'micromatch'; export type ResolversComposition< Resolver extends GraphQLFieldResolver = GraphQLFieldResolver @@ -35,7 +35,7 @@ function resolveRelevantMappings = Record< } const [typeNameOrGlob, fieldNameOrGlob] = path.split('.'); - const isTypeMatch = matcher(typeNameOrGlob); + const isTypeMatch = micromatch.matcher(typeNameOrGlob); let fixedFieldGlob = fieldNameOrGlob; // convert single value OR `{singleField}` to `singleField` as matching will fail otherwise @@ -44,7 +44,7 @@ function resolveRelevantMappings = Record< } fixedFieldGlob = fixedFieldGlob.replace(', ', ',').trim(); - const isFieldMatch = matcher(fixedFieldGlob); + const isFieldMatch = micromatch.matcher(fixedFieldGlob); const mappings: string[] = []; for (const typeName in resolvers) {