@@ -25,7 +25,7 @@ import {
2525import { FieldSetConditionData } from '../router-configuration/types' ;
2626import { KeyFieldSetData } from '../v1/normalization/types' ;
2727import { InputNodeKind , OutputNodeKind } from '../utils/types' ;
28- import { FieldName , SubgraphName } from '../types/types' ;
28+ import { DirectiveName , FieldName , SubgraphName , TypeName } from '../types/types' ;
2929
3030export type ArgumentData = {
3131 name : string ;
@@ -39,7 +39,7 @@ export type ConfigureDescriptionData = {
3939} ;
4040
4141export type DirectiveDefinitionData = {
42- argumentTypeNodeByArgumentName : Map < string , ArgumentData > ;
42+ argumentTypeNodeByName : Map < string , ArgumentData > ;
4343 isRepeatable : boolean ;
4444 locations : Set < string > ;
4545 name : string ;
@@ -57,30 +57,30 @@ export enum ExtensionType {
5757
5858export type EnumDefinitionData = {
5959 appearances : number ;
60- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
61- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
62- enumValueDataByValueName : Map < string , EnumValueData > ;
60+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
61+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
62+ enumValueDataByName : Map < string , EnumValueData > ;
6363 extensionType : ExtensionType ;
6464 isInaccessible : boolean ;
6565 kind : Kind . ENUM_TYPE_DEFINITION ;
6666 name : string ;
6767 node : MutableEnumNode ;
6868 persistedDirectivesData : PersistedDirectivesData ;
69- subgraphNames : Set < string > ;
69+ subgraphNames : Set < SubgraphName > ;
7070 description ?: StringValueNode ;
7171} ;
7272
7373export type EnumValueData = {
7474 appearances : number ;
75- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
76- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
75+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
76+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
7777 federatedCoords : string ;
7878 kind : Kind . ENUM_VALUE_DEFINITION ;
7979 name : string ;
8080 node : MutableEnumValueNode ;
81- parentTypeName : string ;
81+ parentTypeName : TypeName ;
8282 persistedDirectivesData : PersistedDirectivesData ;
83- subgraphNames : Set < string > ;
83+ subgraphNames : Set < SubgraphName > ;
8484 description ?: StringValueNode ;
8585} ;
8686
@@ -96,145 +96,146 @@ export type ExternalFieldData = {
9696
9797export type FieldData = {
9898 argumentDataByName : Map < string , InputValueData > ;
99- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
100- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
101- externalFieldDataBySubgraphName : Map < string , ExternalFieldData > ;
99+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
100+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
101+ externalFieldDataBySubgraphName : Map < SubgraphName , ExternalFieldData > ;
102102 federatedCoords : string ;
103- inheritedDirectiveNames : Set < string > ;
103+ inheritedDirectiveNames : Set < DirectiveName > ;
104104 isInaccessible : boolean ;
105105 isShareableBySubgraphName : Map < SubgraphName , boolean > ;
106106 kind : Kind . FIELD_DEFINITION ;
107- name : string ;
107+ name : FieldName ;
108108 namedTypeKind : OutputNodeKind | Kind . NULL ;
109- namedTypeName : string ;
109+ namedTypeName : TypeName ;
110110 node : MutableFieldNode ;
111111 nullLevelsBySubgraphName : Map < SubgraphName , Set < number > > ;
112- originalParentTypeName : string ;
112+ originalParentTypeName : TypeName ;
113113 persistedDirectivesData : PersistedDirectivesData ;
114- renamedParentTypeName : string ;
114+ renamedParentTypeName : TypeName ;
115115 subgraphNames : Set < SubgraphName > ;
116116 type : MutableTypeNode ;
117117 description ?: StringValueNode ;
118118} ;
119119
120120export type InputObjectDefinitionData = {
121- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
122- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
121+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
122+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
123123 extensionType : ExtensionType ;
124- inputValueDataByName : Map < string , InputValueData > ;
124+ inputValueDataByName : Map < FieldName , InputValueData > ;
125125 isInaccessible : boolean ;
126126 kind : Kind . INPUT_OBJECT_TYPE_DEFINITION ;
127- name : string ;
127+ name : TypeName ;
128128 node : MutableInputObjectNode ;
129129 persistedDirectivesData : PersistedDirectivesData ;
130- subgraphNames : Set < string > ;
130+ subgraphNames : Set < SubgraphName > ;
131131 description ?: StringValueNode ;
132132} ;
133133
134134export type InputValueData = {
135- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
136- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
135+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
136+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
137137 federatedCoords : string ;
138138 includeDefaultValue : boolean ;
139139 isArgument : boolean ;
140140 kind : Kind . ARGUMENT | Kind . INPUT_VALUE_DEFINITION ;
141- name : string ;
141+ name : FieldName ;
142142 namedTypeKind : InputNodeKind | Kind . NULL ;
143- namedTypeName : string ;
143+ namedTypeName : TypeName ;
144144 node : MutableInputValueNode ;
145145 originalCoords : string ;
146- originalParentTypeName : string ;
146+ originalParentTypeName : TypeName ;
147147 persistedDirectivesData : PersistedDirectivesData ;
148- renamedParentTypeName : string ;
149- requiredSubgraphNames : Set < string > ;
150- subgraphNames : Set < string > ;
148+ renamedParentTypeName : TypeName ;
149+ requiredSubgraphNames : Set < SubgraphName > ;
150+ subgraphNames : Set < SubgraphName > ;
151151 type : MutableTypeNode ;
152152 defaultValue ?: ConstValueNode ;
153153 description ?: StringValueNode ;
154- fieldName ?: string ;
154+ fieldName ?: FieldName ;
155155} ;
156156
157157export type InterfaceDefinitionData = {
158- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
159- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
158+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
159+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
160160 extensionType : ExtensionType ;
161- fieldDataByName : Map < string , FieldData > ;
162- implementedInterfaceTypeNames : Set < string > ;
161+ fieldDataByName : Map < FieldName , FieldData > ;
162+ implementedInterfaceTypeNames : Set < TypeName > ;
163163 isEntity : boolean ;
164164 isInaccessible : boolean ;
165165 kind : Kind . INTERFACE_TYPE_DEFINITION ;
166- name : string ;
166+ name : TypeName ;
167167 node : MutableInterfaceNode ;
168168 persistedDirectivesData : PersistedDirectivesData ;
169- subgraphNames : Set < string > ;
169+ requireFetchReasonsFieldNames : Set < FieldName > ;
170+ subgraphNames : Set < SubgraphName > ;
170171 description ?: StringValueNode ;
171172} ;
172173
173174export type ObjectDefinitionData = {
174- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
175- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
175+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
176+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
176177 extensionType : ExtensionType ;
177178 fieldDataByName : Map < FieldName , FieldData > ;
178- implementedInterfaceTypeNames : Set < string > ;
179+ implementedInterfaceTypeNames : Set < TypeName > ;
179180 isEntity : boolean ;
180181 isInaccessible : boolean ;
181182 isRootType : boolean ;
182183 kind : Kind . OBJECT_TYPE_DEFINITION ;
183- name : string ;
184+ name : TypeName ;
184185 node : MutableObjectNode ;
185186 persistedDirectivesData : PersistedDirectivesData ;
186- renamedTypeName : string ;
187+ renamedTypeName : TypeName ;
187188 requireFetchReasonsFieldNames : Set < FieldName > ;
188- subgraphNames : Set < string > ;
189+ subgraphNames : Set < SubgraphName > ;
189190 description ?: StringValueNode ;
190191} ;
191192
192193export type PersistedDirectiveDefinitionData = {
193- argumentDataByArgumentName : Map < string , InputValueData > ;
194+ argumentDataByName : Map < string , InputValueData > ;
194195 executableLocations : Set < string > ;
195- name : string ;
196+ name : DirectiveName ;
196197 repeatable : boolean ;
197- subgraphNames : Set < string > ;
198+ subgraphNames : Set < SubgraphName > ;
198199 description ?: StringValueNode ;
199200} ;
200201
201202export type PersistedDirectivesData = {
202203 deprecatedReason : string ;
203- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
204+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
204205 isDeprecated : boolean ;
205206 tagDirectiveByName : Map < string , ConstDirectiveNode > ;
206207} ;
207208
208209export type ScalarDefinitionData = {
209- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
210- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
210+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
211+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
211212 extensionType : ExtensionType ;
212213 kind : Kind . SCALAR_TYPE_DEFINITION ;
213- name : string ;
214+ name : TypeName ;
214215 node : MutableScalarNode ;
215216 persistedDirectivesData : PersistedDirectivesData ;
216- subgraphNames : Set < string > ;
217+ subgraphNames : Set < SubgraphName > ;
217218 description ?: StringValueNode ;
218219} ;
219220
220221export type SchemaData = {
221- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
222+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
222223 kind : Kind . SCHEMA_DEFINITION ;
223224 name : string ;
224225 operationTypes : Map < OperationTypeNode , OperationTypeDefinitionNode > ;
225226 description ?: StringValueNode ;
226227} ;
227228
228229export type UnionDefinitionData = {
229- configureDescriptionDataBySubgraphName : Map < string , ConfigureDescriptionData > ;
230- directivesByDirectiveName : Map < string , Array < ConstDirectiveNode > > ;
230+ configureDescriptionDataBySubgraphName : Map < SubgraphName , ConfigureDescriptionData > ;
231+ directivesByDirectiveName : Map < DirectiveName , Array < ConstDirectiveNode > > ;
231232 extensionType : ExtensionType ;
232233 kind : Kind . UNION_TYPE_DEFINITION ;
233- name : string ;
234- memberByMemberTypeName : Map < string , NamedTypeNode > ;
234+ name : TypeName ;
235+ memberByMemberTypeName : Map < TypeName , NamedTypeNode > ;
235236 node : MutableUnionNode ;
236237 persistedDirectivesData : PersistedDirectivesData ;
237- subgraphNames : Set < string > ;
238+ subgraphNames : Set < SubgraphName > ;
238239 description ?: StringValueNode ;
239240} ;
240241
@@ -268,28 +269,28 @@ export type EntityData = {
268269 // If propagated in documentNodeByKeyFieldSet, at least one subgraph defines a resolvable key with this field set.
269270 documentNodeByKeyFieldSet : Map < string , DocumentNode > ;
270271 keyFieldSets : Set < string > ;
271- keyFieldSetDatasBySubgraphName : Map < string , Map < string , KeyFieldSetData > > ;
272- subgraphNames : Set < string > ;
273- typeName : string ;
272+ keyFieldSetDatasBySubgraphName : Map < SubgraphName , Map < string , KeyFieldSetData > > ;
273+ subgraphNames : Set < SubgraphName > ;
274+ typeName : TypeName ;
274275} ;
275276
276277export type SimpleFieldData = {
277- name : string ;
278- namedTypeName : string ;
278+ name : FieldName ;
279+ namedTypeName : TypeName ;
279280} ;
280281
281282export type EntityInterfaceSubgraphData = {
282- concreteTypeNames : Set < string > ;
283+ concreteTypeNames : Set < TypeName > ;
283284 fieldDatas : Array < SimpleFieldData > ;
284- interfaceFieldNames : Set < string > ;
285- interfaceObjectFieldNames : Set < string > ;
285+ interfaceFieldNames : Set < FieldName > ;
286+ interfaceObjectFieldNames : Set < FieldName > ;
286287 isInterfaceObject : boolean ;
287288 resolvable : boolean ;
288- typeName : string ;
289+ typeName : TypeName ;
289290} ;
290291
291292export type FieldAuthorizationData = {
292- fieldName : string ;
293+ fieldName : FieldName ;
293294 inheritedData : InheritedAuthorizationData ;
294295 originalData : OriginalAuthorizationData ;
295296} ;
@@ -306,11 +307,11 @@ export type OriginalAuthorizationData = {
306307} ;
307308
308309export type AuthorizationData = {
309- fieldAuthDataByFieldName : Map < string , FieldAuthorizationData > ;
310+ fieldAuthDataByFieldName : Map < FieldName , FieldAuthorizationData > ;
310311 requiredScopes : Array < Set < string > > ;
311312 requiredScopesByOR : Array < Set < string > > ;
312313 requiresAuthentication : boolean ;
313- typeName : string ;
314+ typeName : TypeName ;
314315} ;
315316
316317export type ConditionalFieldData = {
@@ -319,11 +320,11 @@ export type ConditionalFieldData = {
319320} ;
320321
321322export type EntityInterfaceFederationData = {
322- concreteTypeNames : Set < string > ;
323- fieldDatasBySubgraphName : Map < string , Array < SimpleFieldData > > ;
324- interfaceFieldNames : Set < string > ;
325- interfaceObjectFieldNames : Set < string > ;
326- interfaceObjectSubgraphs : Set < string > ;
327- subgraphDataByTypeName : Map < string , EntityInterfaceSubgraphData > ;
328- typeName : string ;
323+ concreteTypeNames : Set < TypeName > ;
324+ fieldDatasBySubgraphName : Map < SubgraphName , Array < SimpleFieldData > > ;
325+ interfaceFieldNames : Set < FieldName > ;
326+ interfaceObjectFieldNames : Set < FieldName > ;
327+ interfaceObjectSubgraphNames : Set < SubgraphName > ;
328+ subgraphDataByTypeName : Map < TypeName , EntityInterfaceSubgraphData > ;
329+ typeName : TypeName ;
329330} ;
0 commit comments