UNPKG

@graphql-tools/schema

Version:

A set of utils for faster development of GraphQL tools

19 lines (18 loc) • 684 B
import { GraphQLSchema } from 'graphql'; import { IExecutableSchemaDefinition } from './types.cjs'; /** * Configuration object for schema merging */ export type MergeSchemasConfig<T = any> = Partial<IExecutableSchemaDefinition<T>> & { /** * The schemas to be merged */ schemas?: GraphQLSchema[]; }; /** * Synchronously merges multiple schemas, typeDefinitions and/or resolvers into a single schema. * Pass `onFieldTypeConflict` to choose a field when two schemas share a field name. * Fields that exist on only one schema are still kept. * @param config Configuration object */ export declare function mergeSchemas(config: MergeSchemasConfig): GraphQLSchema;