2929 GraphQLEnumType ,
3030 GraphQLEnumValue ,
3131 GraphQLField ,
32- GraphQLID ,
3332 GraphQLList ,
3433 GraphQLNonNull ,
3534 GraphQLObjectType ,
@@ -513,8 +512,6 @@ def get_fields() -> dict[str, GraphQLField]:
513512 fields = {}
514513
515514 # System fields
516- if type_name == "Vehicle" or branch_row .get ("instances" ):
517- fields ["id" ] = GraphQLField (GraphQLNonNull (GraphQLID ))
518515 if instance_tag_type := vspec_comments .get ("instance_tag_types" , {}).get (type_name ):
519516 if instance_tag_type in types_registry :
520517 fields ["instanceTag" ] = GraphQLField (types_registry [instance_tag_type ])
@@ -537,10 +534,7 @@ def get_fields() -> dict[str, GraphQLField]:
537534
538535 if leaf_type := _get_vss_type_if_valid (leaf_row ):
539536 field_metadata = {"element" : leaf_type , "fqn" : child_fqn }
540-
541- # Capture extended attributes if present
542537 field_metadata .update (_extract_extended_attributes (leaf_row , extended_attributes ))
543-
544538 vspec_comments ["field_vss_types" ][field_path ] = field_metadata
545539
546540 if pd .notna (leaf_row .get ("min" )) or pd .notna (leaf_row .get ("max" )):
@@ -597,8 +591,12 @@ def get_fields() -> dict[str, GraphQLField]:
597591 {"fqn" : child_fqn , "plural_field_name" : plural_field_name , "path_in_graphql_model" : field_path }
598592 )
599593 else :
594+ field_path = build_field_path (type_name , field_name )
600595 fields [field_name ] = GraphQLField (child_type )
601596
597+ # Annotate field with @vspec directive (shared for both cases)
598+ vspec_comments ["field_vss_types" ][field_path ] = {"element" : "BRANCH" , "fqn" : child_fqn }
599+
602600 return fields
603601
604602 # Store type-level metadata including extended attributes
@@ -652,10 +650,7 @@ def get_hoisted_fields(
652650 "fqn" : leaf_fqn ,
653651 "instantiate" : False ,
654652 }
655-
656- # Capture extended attributes if present
657653 field_metadata .update (_extract_extended_attributes (leaf_row , extended_attributes ))
658-
659654 vspec_comments ["field_vss_types" ][field_path ] = field_metadata
660655
661656 if pd .notna (leaf_row .get ("min" )) or pd .notna (leaf_row .get ("max" )):
0 commit comments