Skip to content

Commit

Permalink
Support nullable List of nullables.
Browse files Browse the repository at this point in the history
  • Loading branch information
cancan101 committed May 5, 2024
1 parent 439a012 commit d1ea7c0
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions graphqldb/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,24 @@ def __init__(
list_type = cast(TypeInfo, list_type)

item_container_type = list_type["ofType"]
if item_container_type is None:
item_container_name = list_type["name"]
if item_container_type is not None:
# TODO(cancan101): put this info into type system
item_container_type = cast(TypeInfo, item_container_type)
elif item_container_name is not None:
item_container_type = list_type
else:
raise ValueError("Unable to resolve item_container_type")

# TODO(cancan101): put this info into type system
item_container_type = cast(TypeInfo, item_container_type)

node_type = item_container_type["ofType"]
if node_type is None:
node_name = item_container_type["name"]
if node_type is not None:
node_type_name = node_type["name"]
elif node_name is not None:
node_type_name = node_name
else:
raise ValueError("Unable to resolve node_type")

node_type_name = node_type["name"]
if node_type_name is None:
raise ValueError("Unable to resolve node_type_name")

Expand Down

0 comments on commit d1ea7c0

Please sign in to comment.