1 | import { StringValueNode, NameNode, DocumentNode, DirectiveNode, GraphQLNamedType, GraphQLError, GraphQLSchema, GraphQLObjectType, GraphQLField, TypeDefinitionNode, TypeExtensionNode, ASTNode, DirectiveDefinitionNode, GraphQLDirective, OperationTypeNode, NonNullTypeNode, NamedTypeNode } from 'graphql';
|
2 | import { ExternalFieldDefinition, DefaultRootOperationTypeName, Maybe, FederationDirective, ServiceDefinition } from './types';
|
3 | import type { FederationType, FederationField, FieldSet } from './types';
|
4 | import type { ASTNodeWithDirectives } from '@apollo/subgraph/dist/directives';
|
5 | export declare function isStringValueNode(node: any): node is StringValueNode;
|
6 | export declare function isDirectiveDefinitionNode(node: any): node is DirectiveDefinitionNode;
|
7 | export declare function isNonNullTypeNode(node: any): node is NonNullTypeNode;
|
8 | export declare function isNamedTypeNode(node: any): node is NamedTypeNode;
|
9 | export declare function mapFieldNamesToServiceName<Node extends {
|
10 | name: NameNode;
|
11 | }>(fields: ReadonlyArray<Node>, serviceName: string): any;
|
12 | export declare function findDirectivesOnNode(node: Maybe<ASTNodeWithDirectives>, directiveName: string): DirectiveNode[];
|
13 | export declare function printFieldSet(selections: FieldSet): string;
|
14 | export declare function findSelectionSetOnNode(node: Maybe<ASTNodeWithDirectives>, directiveName: string, printedSelectionSet: string): import("graphql").ValueNode | undefined;
|
15 | export declare function stripExternalFieldsFromTypeDefs(typeDefs: DocumentNode, serviceName: string): {
|
16 | typeDefsWithoutExternalFields: DocumentNode;
|
17 | strippedFields: ExternalFieldDefinition[];
|
18 | };
|
19 | export declare function stripTypeSystemDirectivesFromTypeDefs(typeDefs: DocumentNode): DocumentNode;
|
20 | export declare function parseFieldSet(source: string): FieldSet;
|
21 | export declare function hasMatchingFieldInDirectives({ directives, fieldNameToMatch, namedType, }: {
|
22 | directives: DirectiveNode[];
|
23 | fieldNameToMatch: String;
|
24 | namedType: GraphQLNamedType;
|
25 | }): boolean;
|
26 | export declare const logServiceAndType: (serviceName: string, typeName: string, fieldName?: string) => string;
|
27 | export declare function logDirective(directiveName: string): string;
|
28 | export declare function errorWithCode(code: string, message: string, nodes?: ReadonlyArray<ASTNode> | ASTNode | undefined): GraphQLError;
|
29 | export declare function findTypesContainingFieldWithReturnType(schema: GraphQLSchema, node: GraphQLField<any, any>): GraphQLObjectType[];
|
30 | export declare function findFieldsThatReturnType({ schema, typeToFind, }: {
|
31 | schema: GraphQLSchema;
|
32 | typeToFind: GraphQLNamedType;
|
33 | }): GraphQLField<any, any>[];
|
34 | export declare function selectionIncludesField({ selections, selectionSetType, typeToFind, fieldToFind, }: {
|
35 | selections: FieldSet;
|
36 | selectionSetType: GraphQLObjectType;
|
37 | typeToFind: GraphQLObjectType;
|
38 | fieldToFind: string;
|
39 | }): boolean;
|
40 | export declare function isTypeNodeAnEntity(node: TypeDefinitionNode | TypeExtensionNode): boolean;
|
41 | export declare function diffTypeNodes(firstNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode, secondNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode): {
|
42 | name: string[];
|
43 | kind: any[];
|
44 | fields: {
|
45 | [fieldName: string]: string[];
|
46 | };
|
47 | fieldArgs: {
|
48 | [fieldName: string]: {
|
49 | [argumentName: string]: string[];
|
50 | };
|
51 | };
|
52 | unionTypes: {
|
53 | [typeName: string]: boolean;
|
54 | };
|
55 | locations: string[];
|
56 | directiveArgs: {
|
57 | [argumentName: string]: string[];
|
58 | };
|
59 | };
|
60 | export declare function typeNodesAreEquivalent(firstNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode, secondNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode): boolean;
|
61 | export declare function findTypeNodeInServiceList(typeName: string, serviceName: string, serviceList: ServiceDefinition[]): import("graphql").DefinitionNode | undefined;
|
62 | export declare const defKindToExtKind: {
|
63 | [kind: string]: string;
|
64 | };
|
65 | export declare const executableDirectiveLocations: string[];
|
66 | export declare const reservedRootFields: string[];
|
67 | export declare const defaultRootOperationNameLookup: {
|
68 | [node in OperationTypeNode]: DefaultRootOperationTypeName;
|
69 | };
|
70 | export declare type CompositionResult = CompositionFailure | CompositionSuccess;
|
71 | export interface CompositionFailure {
|
72 | schema: GraphQLSchema;
|
73 | errors: GraphQLError[];
|
74 | supergraphSdl?: undefined;
|
75 | }
|
76 | export interface CompositionSuccess {
|
77 | schema: GraphQLSchema;
|
78 | supergraphSdl: string;
|
79 | errors?: undefined;
|
80 | }
|
81 | export declare function compositionHasErrors(compositionResult: CompositionResult): compositionResult is CompositionFailure;
|
82 | export declare function assertCompositionSuccess(compositionResult: CompositionResult, message?: string): asserts compositionResult is CompositionSuccess;
|
83 | export declare function assertCompositionFailure(compositionResult: CompositionResult, message?: string): asserts compositionResult is CompositionFailure;
|
84 | export declare function getFederationMetadata(obj: GraphQLNamedType): FederationType | undefined;
|
85 | export declare function getFederationMetadata(obj: GraphQLField<any, any>): FederationField | undefined;
|
86 | export declare function getFederationMetadata(obj: GraphQLDirective): FederationDirective | undefined;
|
87 |
|
\ | No newline at end of file |