@graphql-tools/schema 8.4.1-alpha-1f8de7bd.0 → 8.4.1-alpha-d5be380f.0
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/index.js +2 -0
- package/index.mjs +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -296,6 +296,8 @@ function addResolversToExistingSchemaWithHealing(schema, resolvers, defaultField
|
|
|
296
296
|
utils.forEachDefaultValue(schema, utils.serializeInputValue);
|
|
297
297
|
// reparse all default values with new parsing functions.
|
|
298
298
|
utils.forEachDefaultValue(schema, utils.parseInputValue);
|
|
299
|
+
// schema may have new scalar/enum types that require healing
|
|
300
|
+
utils.healSchema(schema);
|
|
299
301
|
if (defaultFieldResolver != null) {
|
|
300
302
|
utils.forEachField(schema, field => {
|
|
301
303
|
if (!field.resolve) {
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isScalarType, getNamedType, defaultFieldResolver, isEnumType, GraphQLEnumType, isUnionType, isObjectType, isInterfaceType, isSchema, isSpecifiedScalarType, GraphQLScalarType, GraphQLUnionType, GraphQLObjectType, GraphQLInterfaceType, buildSchema, buildASTSchema } from 'graphql';
|
|
2
|
-
import { forEachField, mapSchema, MapperKind, forEachDefaultValue, serializeInputValue, parseInputValue, pruneSchema, asArray, getResolversFromSchema } from '@graphql-tools/utils';
|
|
2
|
+
import { forEachField, mapSchema, MapperKind, forEachDefaultValue, serializeInputValue, parseInputValue, healSchema, pruneSchema, asArray, getResolversFromSchema } from '@graphql-tools/utils';
|
|
3
3
|
import { mergeTypeDefs, mergeResolvers, mergeExtensions, applyExtensions, extractExtensionsFromSchema } from '@graphql-tools/merge';
|
|
4
4
|
|
|
5
5
|
function assertResolversPresent(schema, resolverValidationOptions = {}) {
|
|
@@ -292,6 +292,8 @@ function addResolversToExistingSchemaWithHealing(schema, resolvers, defaultField
|
|
|
292
292
|
forEachDefaultValue(schema, serializeInputValue);
|
|
293
293
|
// reparse all default values with new parsing functions.
|
|
294
294
|
forEachDefaultValue(schema, parseInputValue);
|
|
295
|
+
// schema may have new scalar/enum types that require healing
|
|
296
|
+
healSchema(schema);
|
|
295
297
|
if (defaultFieldResolver != null) {
|
|
296
298
|
forEachField(schema, field => {
|
|
297
299
|
if (!field.resolve) {
|