From 14950fbff3752392d73eae6b182657f2bbee71c8 Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Wed, 10 Aug 2022 20:10:36 +0300 Subject: [PATCH] Revert the breaking change introduces in --- .changeset/real-cougars-sing.md | 7 +++++++ packages/merge/src/extensions.ts | 1 + packages/schema/src/index.ts | 2 +- .../src/extractExtensionsFromSchema.ts | 11 +++-------- packages/utils/src/index.ts | 1 + 5 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 .changeset/real-cougars-sing.md rename packages/{schema => utils}/src/extractExtensionsFromSchema.ts (91%) diff --git a/.changeset/real-cougars-sing.md b/.changeset/real-cougars-sing.md new file mode 100644 index 00000000000..aeed6e69670 --- /dev/null +++ b/.changeset/real-cougars-sing.md @@ -0,0 +1,7 @@ +--- +'@graphql-tools/utils': minor +'@graphql-tools/merge': patch +'@graphql-tools/schema': patch +--- + +Revert the breaking change introduced in `@graphql-tools/merge` diff --git a/packages/merge/src/extensions.ts b/packages/merge/src/extensions.ts index 2341b11f893..0a534a1cffd 100644 --- a/packages/merge/src/extensions.ts +++ b/packages/merge/src/extensions.ts @@ -1,5 +1,6 @@ import { GraphQLSchema, GraphQLObjectType, GraphQLEnumType } from 'graphql'; import { ExtensionsObject, Maybe, mergeDeep, SchemaExtensions } from '@graphql-tools/utils'; +export { extractExtensionsFromSchema } from '@graphql-tools/utils'; export function mergeExtensions(extensions: SchemaExtensions[]): SchemaExtensions { return mergeDeep(extensions); diff --git a/packages/schema/src/index.ts b/packages/schema/src/index.ts index 608efc971cc..f18afcde741 100644 --- a/packages/schema/src/index.ts +++ b/packages/schema/src/index.ts @@ -6,4 +6,4 @@ export { extendResolversFromInterfaces } from './extendResolversFromInterfaces.j export * from './makeExecutableSchema.js'; export * from './types.js'; export * from './merge-schemas.js'; -export * from './extractExtensionsFromSchema.js'; +export { extractExtensionsFromSchema } from '@graphql-tools/utils'; diff --git a/packages/schema/src/extractExtensionsFromSchema.ts b/packages/utils/src/extractExtensionsFromSchema.ts similarity index 91% rename from packages/schema/src/extractExtensionsFromSchema.ts rename to packages/utils/src/extractExtensionsFromSchema.ts index a5d7a588c30..c3b6928e9ff 100644 --- a/packages/schema/src/extractExtensionsFromSchema.ts +++ b/packages/utils/src/extractExtensionsFromSchema.ts @@ -1,12 +1,7 @@ -import { - SchemaExtensions, - ObjectTypeExtensions, - EnumTypeExtensions, - InputTypeExtensions, - mapSchema, - MapperKind, -} from '@graphql-tools/utils'; +import { mapSchema } from './mapSchema.js'; import { GraphQLFieldConfig, GraphQLSchema } from 'graphql'; +import { EnumTypeExtensions, InputTypeExtensions, ObjectTypeExtensions, SchemaExtensions } from './types.js'; +import { MapperKind } from './Interfaces.js'; export function extractExtensionsFromSchema(schema: GraphQLSchema): SchemaExtensions { const result: SchemaExtensions = { diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index ae455cf86f1..b25d642a7c4 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -48,3 +48,4 @@ export * from './inspect.js'; export * from './memoize.js'; export * from './fixSchemaAst.js'; export * from './getOperationASTFromRequest.js'; +export * from './extractExtensionsFromSchema.js';