import { type Warning } from '../../warnings/types'; import { type ConstDirectiveNode, type DirectiveDefinitionNode, type DocumentNode, type GraphQLSchema, type StringValueNode } from 'graphql'; import { type ConfigureDescriptionData, type ExtensionType, type FederatedDirectivesData, type ParentDefinitionData } from '../../schema-building/types/types'; import { type FieldConfiguration } from '../../router-configuration/types'; import { type SubgraphConfig } from '../../subgraph/types'; import type { DirectiveName, SubgraphName, TypeName } from '../../types/types'; import { type ExecutionMultiFailure, type ExecutionSuccess } from '../../types/results'; export interface FederationFailure extends ExecutionMultiFailure { errors: Array; warnings: Array; } export interface FederationSuccess extends ExecutionSuccess { directiveDefinitionByName: Map; fieldConfigurations: Array; federatedGraphAST: DocumentNode; federatedGraphClientSchema: GraphQLSchema; federatedGraphSchema: GraphQLSchema; parentDefinitionDataByTypeName: Map; subgraphConfigBySubgraphName: Map; shouldIncludeClientSchema?: boolean; warnings: Array; } export type FederationResult = FederationFailure | FederationSuccess; export interface FederationResultWithContractsFailure extends ExecutionMultiFailure { errors: Array; warnings: Array; } export interface FederationResultWithContractsSuccess extends ExecutionSuccess { directiveDefinitionByName: Map; fieldConfigurations: Array; federatedGraphAST: DocumentNode; federatedGraphClientSchema: GraphQLSchema; federatedGraphSchema: GraphQLSchema; federationResultByContractName: Map; parentDefinitionDataByTypeName: Map; subgraphConfigBySubgraphName: Map; warnings: Array; shouldIncludeClientSchema?: boolean; } export type FederationResultWithContracts = FederationResultWithContractsFailure | FederationResultWithContractsSuccess; export type ContractTagOptions = { tagNamesToExclude: Set; tagNamesToInclude: Set; }; export type MutualParentDefinitionData = { configureDescriptionDataBySubgraphName: Map; directivesByName: Map>; extensionType: ExtensionType; name: TypeName; federatedDirectivesData: FederatedDirectivesData; description?: StringValueNode; };