Skip to content

Commit 956be94

Browse files
authored
Add support for Time scalar (#155)
1 parent fff66ae commit 956be94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphqldb/adapter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Integer,
2222
ISODate,
2323
ISODateTime,
24+
ISOTime,
2425
String,
2526
)
2627
from shillelagh.typing import RequestedOrder
@@ -77,6 +78,9 @@ def parse_gql_type(type_info: TypeInfo) -> Field:
7778
elif name == "Date":
7879
# https://www.graphql-scalars.dev/docs/scalars/date
7980
return ISODate()
81+
elif name == "Time":
82+
# https://www.graphql-scalars.dev/docs/scalars/time
83+
return ISOTime()
8084
else:
8185
# TODO(cancan101): how do we want to handle other scalars?
8286
raise ValueError(f"Unknown type: {name}")

0 commit comments

Comments
 (0)