UNPKG

@graphql-mesh/fusion-composition

Version:

Basic composition utility for Fusion spec

10 lines (9 loc) 458 B
import { GraphQLSchema } from 'graphql'; import { MergeSchemasConfig } from '@graphql-tools/schema'; export interface SubgraphConfig { name: string; schema: GraphQLSchema; transforms?: SubgraphTransform[]; } export type SubgraphTransform = (schema: GraphQLSchema, subgraphConfig: SubgraphConfig) => GraphQLSchema; export declare function composeSubgraphs(subgraphs: SubgraphConfig[], options?: Omit<MergeSchemasConfig, 'schema'>): GraphQLSchema;