@graphql-tools/delegate 12.2.0 → 12.2.1-alpha-529d49ee524b46cd376c7355778448eb3f68fe92
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/CHANGELOG.md +9 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @graphql-tools/delegate
|
|
2
2
|
|
|
3
|
+
## 12.2.1-alpha-529d49ee524b46cd376c7355778448eb3f68fe92
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#2644](https://github.com/graphql-hive/gateway/pull/2644) [`e62d96b`](https://github.com/graphql-hive/gateway/commit/e62d96b76255e9b2c50d3cc74ba3b1c01638044c) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Fix compatibility with GraphQL 14 and 15 by avoiding runtime access to the `OperationTypeNode` enum, which is only available in GraphQL 16 and later
|
|
9
|
+
|
|
10
|
+
Closes [#2643](https://github.com/graphql-hive/gateway/issues/2643)
|
|
11
|
+
|
|
3
12
|
## 12.2.0
|
|
4
13
|
### Minor Changes
|
|
5
14
|
|
package/dist/index.cjs
CHANGED
|
@@ -3075,7 +3075,7 @@ function delegateToSchema(options) {
|
|
|
3075
3075
|
}
|
|
3076
3076
|
}
|
|
3077
3077
|
const fragments = info ? getFragmentDefinitions(info) : void 0;
|
|
3078
|
-
const targetRootType = operation ===
|
|
3078
|
+
const targetRootType = operation === "mutation" ? targetSchema.getMutationType() : operation === "subscription" ? targetSchema.getSubscriptionType() : targetSchema.getQueryType();
|
|
3079
3079
|
const request = createRequest({
|
|
3080
3080
|
subgraphName: schema.name,
|
|
3081
3081
|
fragments,
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memoize2, memoize1, collectFields, relocatedError, mergeDeep, promiseReduce, pathToArray, memoize3, getDefinedRootType, createGraphQLError, implementsAbstractType, getRootTypeNames, astFromArg, astFromValueUntyped, asArray, isAsyncIterable, getOperationASTFromRequest } from '@graphql-tools/utils';
|
|
2
2
|
export { createDeferred } from '@graphql-tools/utils';
|
|
3
|
-
import { GraphQLError, locatedError, isAbstractType, getNullableType, isLeafType, isCompositeType, isListType, responsePathAsArray, Kind, TypeInfo, versionInfo, visit, visitWithTypeInfo, isNullableType, isUnionType, getNamedType, isObjectType, isInterfaceType, typeFromAST, isTypeSubTypeOf, isNonNullType, isInputObjectType, defaultFieldResolver, isSchema,
|
|
3
|
+
import { GraphQLError, locatedError, isAbstractType, getNullableType, isLeafType, isCompositeType, isListType, responsePathAsArray, Kind, TypeInfo, versionInfo, visit, visitWithTypeInfo, isNullableType, isUnionType, getNamedType, isObjectType, isInterfaceType, typeFromAST, isTypeSubTypeOf, isNonNullType, isInputObjectType, defaultFieldResolver, isSchema, validate } from 'graphql';
|
|
4
4
|
import { handleMaybePromise, isPromise, createDeferredPromise, mapAsyncIterator } from '@whatwg-node/promise-helpers';
|
|
5
5
|
import { CRITICAL_ERROR, executorFromSchema } from '@graphql-tools/executor';
|
|
6
6
|
export { executorFromSchema as createDefaultExecutor } from '@graphql-tools/executor';
|
|
@@ -3075,7 +3075,7 @@ function delegateToSchema(options) {
|
|
|
3075
3075
|
}
|
|
3076
3076
|
}
|
|
3077
3077
|
const fragments = info ? getFragmentDefinitions(info) : void 0;
|
|
3078
|
-
const targetRootType = operation ===
|
|
3078
|
+
const targetRootType = operation === "mutation" ? targetSchema.getMutationType() : operation === "subscription" ? targetSchema.getSubscriptionType() : targetSchema.getQueryType();
|
|
3079
3079
|
const request = createRequest({
|
|
3080
3080
|
subgraphName: schema.name,
|
|
3081
3081
|
fragments,
|
package/package.json
CHANGED