@graphql-tools/schema
Version:
A set of utils for faster development of GraphQL tools
19 lines (18 loc) • 683 B
TypeScript
import { GraphQLSchema } from 'graphql';
import { IExecutableSchemaDefinition } from './types.js';
/**
* 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;