Skip to content

Commit

Permalink
Add support for Time scalar (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
cancan101 authored Nov 4, 2022
1 parent fff66ae commit 956be94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graphqldb/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Integer,
ISODate,
ISODateTime,
ISOTime,
String,
)
from shillelagh.typing import RequestedOrder
Expand Down Expand Up @@ -77,6 +78,9 @@ def parse_gql_type(type_info: TypeInfo) -> Field:
elif name == "Date":
# https://www.graphql-scalars.dev/docs/scalars/date
return ISODate()
elif name == "Time":
# https://www.graphql-scalars.dev/docs/scalars/time
return ISOTime()
else:
# TODO(cancan101): how do we want to handle other scalars?
raise ValueError(f"Unknown type: {name}")
Expand Down

0 comments on commit 956be94

Please sign in to comment.