1 | import { DocumentNode, FieldDefinitionNode, DirectiveDefinitionNode, DirectiveNode, FieldNode, InlineFragmentNode } from 'graphql';
|
2 | export declare type Maybe<T> = null | undefined | T;
|
3 | export declare type ServiceName = string | null;
|
4 | export declare type DefaultRootOperationTypeName = 'Query' | 'Mutation' | 'Subscription';
|
5 | export interface ExternalFieldDefinition {
|
6 | field: FieldDefinitionNode;
|
7 | parentTypeName: string;
|
8 | serviceName: string;
|
9 | }
|
10 | export interface ServiceNameToKeyDirectivesMap {
|
11 | [serviceName: string]: FieldSet[] | undefined;
|
12 | }
|
13 | export declare type DirectiveUsages = Map<string, DirectiveNode[]>;
|
14 | export interface FederationType {
|
15 | serviceName?: ServiceName;
|
16 | keys?: ServiceNameToKeyDirectivesMap;
|
17 | externals?: {
|
18 | [serviceName: string]: ExternalFieldDefinition[];
|
19 | };
|
20 | isValueType?: boolean;
|
21 | directiveUsages?: DirectiveUsages;
|
22 | }
|
23 | export declare type FieldSet = readonly (FieldNode | InlineFragmentNode)[];
|
24 | export interface FederationField {
|
25 | serviceName?: ServiceName;
|
26 | requires?: FieldSet;
|
27 | provides?: FieldSet;
|
28 | belongsToValueType?: boolean;
|
29 | directiveUsages?: DirectiveUsages;
|
30 | }
|
31 | export interface FederationDirective {
|
32 | directiveDefinitions: {
|
33 | [serviceName: string]: DirectiveDefinitionNode;
|
34 | };
|
35 | }
|
36 | export interface ServiceDefinition {
|
37 | typeDefs: DocumentNode;
|
38 | name: string;
|
39 | url?: string;
|
40 | }
|
41 | declare module 'graphql/language/ast' {
|
42 | interface UnionTypeDefinitionNode {
|
43 | serviceName?: string | null;
|
44 | }
|
45 | interface UnionTypeExtensionNode {
|
46 | serviceName?: string | null;
|
47 | }
|
48 | interface EnumTypeDefinitionNode {
|
49 | serviceName?: string | null;
|
50 | }
|
51 | interface EnumTypeExtensionNode {
|
52 | serviceName?: string | null;
|
53 | }
|
54 | interface ScalarTypeDefinitionNode {
|
55 | serviceName?: string | null;
|
56 | }
|
57 | interface ScalarTypeExtensionNode {
|
58 | serviceName?: string | null;
|
59 | }
|
60 | interface ObjectTypeDefinitionNode {
|
61 | serviceName?: string | null;
|
62 | }
|
63 | interface ObjectTypeExtensionNode {
|
64 | serviceName?: string | null;
|
65 | }
|
66 | interface InterfaceTypeDefinitionNode {
|
67 | serviceName?: string | null;
|
68 | }
|
69 | interface InterfaceTypeExtensionNode {
|
70 | serviceName?: string | null;
|
71 | }
|
72 | interface InputObjectTypeDefinitionNode {
|
73 | serviceName?: string | null;
|
74 | }
|
75 | interface InputObjectTypeExtensionNode {
|
76 | serviceName?: string | null;
|
77 | }
|
78 | }
|
79 |
|
\ | No newline at end of file |