@graphql-tools/wrap
Advanced tools
Comparing version 5.0.1-alpha-b7ec6b7.0 to 5.0.1-alpha-bdd506c.0
@@ -89,5 +89,6 @@ 'use strict'; | ||
const config = type.toConfig(); | ||
Object.keys(config.fields).forEach(fieldName => { | ||
const fields = type.getFields(); | ||
Object.keys(fields).forEach(fieldName => { | ||
config.fields[fieldName] = { | ||
...config.fields[fieldName], | ||
...utils.fieldToFieldConfig(fields[fieldName]), | ||
...proxyingResolvers[type.name][fieldName], | ||
@@ -360,3 +361,2 @@ }; | ||
transformFields(type, fieldTransformer) { | ||
const typeConfig = type.toConfig(); | ||
const fields = type.getFields(); | ||
@@ -368,3 +368,3 @@ const newFields = {}; | ||
if (typeof transformedField === 'undefined') { | ||
newFields[fieldName] = typeConfig.fields[fieldName]; | ||
newFields[fieldName] = utils.fieldToFieldConfig(fields[fieldName]); | ||
} | ||
@@ -377,3 +377,3 @@ else if (transformedField !== null) { | ||
? transformedField.field | ||
: typeConfig.fields[fieldName]; | ||
: utils.fieldToFieldConfig(fields[fieldName]); | ||
if (newName !== fieldName) { | ||
@@ -380,0 +380,0 @@ const typeName = type.name; |
import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, isSpecifiedScalarType, isScalarType, isObjectType, isInterfaceType, isUnionType, isInputObjectType, GraphQLInputObjectType, isEnumType, GraphQLEnumType, GraphQLScalarType, visit, Kind, TypeInfo, visitWithTypeInfo, extendSchema, parse, getNullableType, BREAK, buildSchema, getIntrospectionQuery, buildClientSchema } from 'graphql'; | ||
import { getResponseKeyFromInfo, getErrors, mapSchema, MapperKind, applySchemaTransforms, relocatedError, hoistFieldNodes, removeFields, appendFields, healSchema, wrapFieldNode, renameFieldNode, CombinedError } from '@graphql-tools/utils'; | ||
import { getResponseKeyFromInfo, getErrors, mapSchema, MapperKind, fieldToFieldConfig, applySchemaTransforms, relocatedError, hoistFieldNodes, removeFields, appendFields, healSchema, wrapFieldNode, renameFieldNode, CombinedError } from '@graphql-tools/utils'; | ||
import { delegateToSchema, getSubschema, handleResult, isSubschemaConfig, defaultMergedResolver, createMergedResolver } from '@graphql-tools/delegate'; | ||
@@ -85,5 +85,6 @@ import { addResolversToSchema } from '@graphql-tools/schema'; | ||
const config = type.toConfig(); | ||
Object.keys(config.fields).forEach(fieldName => { | ||
const fields = type.getFields(); | ||
Object.keys(fields).forEach(fieldName => { | ||
config.fields[fieldName] = { | ||
...config.fields[fieldName], | ||
...fieldToFieldConfig(fields[fieldName]), | ||
...proxyingResolvers[type.name][fieldName], | ||
@@ -356,3 +357,2 @@ }; | ||
transformFields(type, fieldTransformer) { | ||
const typeConfig = type.toConfig(); | ||
const fields = type.getFields(); | ||
@@ -364,3 +364,3 @@ const newFields = {}; | ||
if (typeof transformedField === 'undefined') { | ||
newFields[fieldName] = typeConfig.fields[fieldName]; | ||
newFields[fieldName] = fieldToFieldConfig(fields[fieldName]); | ||
} | ||
@@ -373,3 +373,3 @@ else if (transformedField !== null) { | ||
? transformedField.field | ||
: typeConfig.fields[fieldName]; | ||
: fieldToFieldConfig(fields[fieldName]); | ||
if (newName !== fieldName) { | ||
@@ -376,0 +376,0 @@ const typeName = type.name; |
{ | ||
"name": "@graphql-tools/wrap", | ||
"version": "5.0.1-alpha-b7ec6b7.0", | ||
"version": "5.0.1-alpha-bdd506c.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -9,5 +9,5 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@graphql-tools/delegate": "5.0.1-alpha-b7ec6b7.0", | ||
"@graphql-tools/schema": "5.0.1-alpha-b7ec6b7.0", | ||
"@graphql-tools/utils": "5.0.1-alpha-b7ec6b7.0", | ||
"@graphql-tools/delegate": "5.0.1-alpha-bdd506c.0", | ||
"@graphql-tools/schema": "5.0.1-alpha-bdd506c.0", | ||
"@graphql-tools/utils": "5.0.1-alpha-bdd506c.0", | ||
"tslib": "1.11.1" | ||
@@ -14,0 +14,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248897
+ Added@graphql-tools/delegate@5.0.1-alpha-bdd506c.0(transitive)
+ Added@graphql-tools/schema@5.0.1-alpha-bdd506c.0(transitive)
+ Added@graphql-tools/utils@5.0.1-alpha-bdd506c.0(transitive)
- Removed@graphql-tools/delegate@5.0.1-alpha-b7ec6b7.0(transitive)
- Removed@graphql-tools/schema@5.0.1-alpha-b7ec6b7.0(transitive)
- Removed@graphql-tools/utils@5.0.1-alpha-b7ec6b7.0(transitive)