Skip to content

Commit ce446fc

Browse files
committed
Suport nullable List of nullables.
1 parent 439a012 commit ce446fc

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

graphqldb/adapter.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,17 +415,24 @@ def __init__(
415415
list_type = cast(TypeInfo, list_type)
416416

417417
item_container_type = list_type["ofType"]
418-
if item_container_type is None:
418+
item_container_name = list_type["name"]
419+
if item_container_type is not None:
420+
# TODO(cancan101): put this info into type system
421+
item_container_type = cast(TypeInfo, item_container_type)
422+
elif item_container_name is not None:
423+
item_container_type = list_type
424+
else:
419425
raise ValueError("Unable to resolve item_container_type")
420426

421-
# TODO(cancan101): put this info into type system
422-
item_container_type = cast(TypeInfo, item_container_type)
423-
424427
node_type = item_container_type["ofType"]
425-
if node_type is None:
428+
node_name = item_container_type["name"]
429+
if node_type is not None:
430+
node_type_name = node_type["name"]
431+
elif node_name is not None:
432+
node_type_name = node_name
433+
else:
426434
raise ValueError("Unable to resolve node_type")
427435

428-
node_type_name = node_type["name"]
429436
if node_type_name is None:
430437
raise ValueError("Unable to resolve node_type_name")
431438

0 commit comments

Comments
 (0)