@graphql-tools/schema-merging
Advanced tools
Comparing version 5.0.1-alpha-394dfba.0 to 5.0.1-alpha-3cbf9d2.0
@@ -8,3 +8,3 @@ 'use strict'; | ||
const utils = require('@graphql-tools/utils'); | ||
const schemaStitching = require('@graphql-tools/schema-stitching'); | ||
const schemaGenerator = require('@graphql-tools/schema-generator'); | ||
@@ -908,3 +908,3 @@ const isMergeableObject = (target) => { | ||
for (const schema of config.schemas) { | ||
extractedResolvers.push(schemaStitching.getResolversFromSchema(schema)); | ||
extractedResolvers.push(utils.getResolversFromSchema(schema)); | ||
extractedExtensions.push(extractExtensionsFromSchema(schema)); | ||
@@ -920,3 +920,3 @@ } | ||
mergeTypes(config), | ||
Promise.all(config.schemas.map(async (schema) => schemaStitching.getResolversFromSchema(schema))).then(extractedResolvers => utils.composeResolvers(mergeResolvers([...extractedResolvers, ...ensureResolvers(config)], config), config.resolversComposition || {})), | ||
Promise.all(config.schemas.map(async (schema) => utils.getResolversFromSchema(schema))).then(extractedResolvers => utils.composeResolvers(mergeResolvers([...extractedResolvers, ...ensureResolvers(config)], config), config.resolversComposition || {})), | ||
Promise.all(config.schemas.map(async (schema) => extractExtensionsFromSchema(schema))).then(extractedExtensions => mergeExtensions(extractedExtensions)), | ||
@@ -936,3 +936,3 @@ ]); | ||
if (resolvers) { | ||
schemaStitching.addResolversToSchema({ | ||
schemaGenerator.addResolversToSchema({ | ||
schema, | ||
@@ -948,7 +948,7 @@ resolvers, | ||
if (config.logger) { | ||
schemaStitching.addErrorLoggingToSchema(schema, config.logger); | ||
schemaGenerator.addErrorLoggingToSchema(schema, config.logger); | ||
} | ||
// use schema directives | ||
if (config.schemaDirectives) { | ||
schemaStitching.SchemaDirectiveVisitor.visitSchemaDirectives(schema, config.schemaDirectives); | ||
utils.SchemaDirectiveVisitor.visitSchemaDirectives(schema, config.schemaDirectives); | ||
} | ||
@@ -955,0 +955,0 @@ // extensions |
import { all } from 'deepmerge'; | ||
import { isScalarType, getDescription, visit, print, Source, Kind, isSchema, parse, isSpecifiedScalarType, isIntrospectionType, isObjectType, isInterfaceType, isInputObjectType, isUnionType, isEnumType, buildSchema, buildASTSchema } from 'graphql'; | ||
import { compareNodes, isNotEqual, printSchemaWithDirectives, createSchemaDefinition, asArray, composeResolvers } from '@graphql-tools/utils'; | ||
import { getResolversFromSchema, addResolversToSchema, addErrorLoggingToSchema, SchemaDirectiveVisitor } from '@graphql-tools/schema-stitching'; | ||
import { compareNodes, isNotEqual, printSchemaWithDirectives, createSchemaDefinition, asArray, getResolversFromSchema, composeResolvers, SchemaDirectiveVisitor } from '@graphql-tools/utils'; | ||
import { addResolversToSchema, addErrorLoggingToSchema } from '@graphql-tools/schema-generator'; | ||
@@ -6,0 +6,0 @@ const isMergeableObject = (target) => { |
@@ -1,2 +0,2 @@ | ||
import { IResolvers } from '@graphql-tools/schema-stitching'; | ||
import { IResolvers } from '@graphql-tools/utils'; | ||
export declare type ResolversFactory<TContext> = (...args: any[]) => IResolvers<any, TContext>; | ||
@@ -3,0 +3,0 @@ export declare type ResolversDefinition<TContext> = IResolvers<any, TContext> | ResolversFactory<TContext>; |
import { GraphQLSchema, DocumentNode, BuildSchemaOptions } from 'graphql'; | ||
import { IResolvers, SchemaDirectiveVisitor, IResolverValidationOptions, ILogger } from '@graphql-tools/schema-stitching'; | ||
import { Config } from './typedefs-mergers/merge-typedefs'; | ||
import { ResolversComposerMapping } from '@graphql-tools/utils'; | ||
import { IResolvers, SchemaDirectiveVisitor, IResolverValidationOptions, ILogger, ResolversComposerMapping } from '@graphql-tools/utils'; | ||
export interface MergeSchemasConfig<Resolvers extends IResolvers = IResolvers> extends Config, BuildSchemaOptions { | ||
@@ -6,0 +5,0 @@ schemas: GraphQLSchema[]; |
{ | ||
"name": "@graphql-tools/schema-merging", | ||
"version": "5.0.1-alpha-394dfba.0", | ||
"version": "5.0.1-alpha-3cbf9d2.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -9,5 +9,5 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@graphql-tools/utils": "5.0.1-alpha-394dfba.0", | ||
"@graphql-tools/schema-generator": "5.0.1-alpha-3cbf9d2.0", | ||
"@graphql-tools/utils": "5.0.1-alpha-3cbf9d2.0", | ||
"deepmerge": "4.2.2", | ||
"@graphql-tools/schema-stitching": "5.0.1-alpha-394dfba.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
267306
2156
+ Added@graphql-tools/schema-generator@5.0.1-alpha-3cbf9d2.0
+ Added@graphql-tools/schema-generator@5.0.1-alpha-3cbf9d2.0(transitive)
+ Added@graphql-tools/utils@5.0.1-alpha-3cbf9d2.0(transitive)
- Removed@graphql-tools/schema-stitching@5.0.1-alpha-394dfba.0
- Removed@graphql-tools/schema-stitching@5.0.1-alpha-394dfba.0(transitive)
- Removed@graphql-tools/utils@5.0.1-alpha-394dfba.0(transitive)