Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support uriburner's linkdata endpoint #377

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions graphqldb/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ def parse_gql_type(type_info: TypeInfo) -> Field:
# TODO(cancan101): figure out if we want to map this to UUID, int, etc
# This should probably be an API-level setting
return String()
elif name == "IRI":
# TODO(cancan101): figure out if we want to map this to Python
# native type, string, etc.
# This should probably be an API-level setting
return String()
elif name == "Int":
return Integer()
elif name == "Float":
Expand Down Expand Up @@ -415,17 +420,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
Loading