UNPKG

@graphql-mesh/fusion-composition

Version:

Basic composition utility for Fusion spec

27 lines (26 loc) 943 B
import type { GraphQLSchema } from 'graphql'; import type { SubgraphConfig } from '../compose.js'; export interface PrefixTransformConfig { /** * The prefix to apply to the schema types. By default it's the API name. */ value?: string; /** * List of ignored types */ ignore?: string[]; /** * Protected custom scalars (e.g. from graphql-scalars) to still prefix. * GraphQL specified scalars (Int, Float, String, Boolean, ID) always stay unprefixed. */ force?: string[]; /** * Changes root types and changes the field names (default: false) */ includeRootOperations?: boolean; /** * Changes types (default: true) */ includeTypes?: boolean; } export declare function createPrefixTransform({ value, ignore, force, includeRootOperations, includeTypes }?: PrefixTransformConfig): (schema: GraphQLSchema, subgraphConfig: SubgraphConfig) => GraphQLSchema;