Skip to content

Commit 2609d71

Browse files
authoredAug 10, 2022
Revert the breaking change introduces in (#4643)
1 parent 8a59a4d commit 2609d71

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed
 

‎.changeset/real-cougars-sing.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-tools/utils': minor
3+
'@graphql-tools/merge': patch
4+
'@graphql-tools/schema': patch
5+
---
6+
7+
Revert the breaking change introduced in `@graphql-tools/merge`

‎packages/merge/src/extensions.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { GraphQLSchema, GraphQLObjectType, GraphQLEnumType } from 'graphql';
22
import { ExtensionsObject, Maybe, mergeDeep, SchemaExtensions } from '@graphql-tools/utils';
3+
export { extractExtensionsFromSchema } from '@graphql-tools/utils';
34

45
export function mergeExtensions(extensions: SchemaExtensions[]): SchemaExtensions {
56
return mergeDeep(extensions);

‎packages/schema/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export { extendResolversFromInterfaces } from './extendResolversFromInterfaces.j
66
export * from './makeExecutableSchema.js';
77
export * from './types.js';
88
export * from './merge-schemas.js';
9-
export * from './extractExtensionsFromSchema.js';
9+
export { extractExtensionsFromSchema } from '@graphql-tools/utils';

‎packages/schema/src/merge-schemas.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import { GraphQLSchema } from 'graphql';
2-
import { IResolvers, asArray, getResolversFromSchema, TypeSource, SchemaExtensions } from '@graphql-tools/utils';
2+
import {
3+
IResolvers,
4+
asArray,
5+
getResolversFromSchema,
6+
TypeSource,
7+
SchemaExtensions,
8+
extractExtensionsFromSchema,
9+
} from '@graphql-tools/utils';
310
import { makeExecutableSchema } from './makeExecutableSchema.js';
411
import { IExecutableSchemaDefinition } from './types.js';
5-
import { extractExtensionsFromSchema } from './extractExtensionsFromSchema.js';
612

713
/**
814
* Configuration object for schema merging

‎packages/schema/src/extractExtensionsFromSchema.ts ‎packages/utils/src/extractExtensionsFromSchema.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import {
2-
SchemaExtensions,
3-
ObjectTypeExtensions,
4-
EnumTypeExtensions,
5-
InputTypeExtensions,
6-
mapSchema,
7-
MapperKind,
8-
} from '@graphql-tools/utils';
1+
import { mapSchema } from './mapSchema.js';
92
import { GraphQLFieldConfig, GraphQLSchema } from 'graphql';
3+
import { EnumTypeExtensions, InputTypeExtensions, ObjectTypeExtensions, SchemaExtensions } from './types.js';
4+
import { MapperKind } from './Interfaces.js';
105

116
export function extractExtensionsFromSchema(schema: GraphQLSchema): SchemaExtensions {
127
const result: SchemaExtensions = {

‎packages/utils/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ export * from './inspect.js';
4848
export * from './memoize.js';
4949
export * from './fixSchemaAst.js';
5050
export * from './getOperationASTFromRequest.js';
51+
export * from './extractExtensionsFromSchema.js';

1 commit comments

Comments
 (1)
Please sign in to comment.