mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-22 13:59:51 +03:00
Do not merge: codecov check
This commit is contained in:
parent
69be326290
commit
56ab0f612d
|
@ -65,6 +65,15 @@ class DateTime(Scalar):
|
||||||
)
|
)
|
||||||
return cls.parse_value(node.value)
|
return cls.parse_value(node.value)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def parse_literal_codecov_test(cls, node, _variables=None):
|
||||||
|
if not isinstance(node, StringValueNode):
|
||||||
|
raise GraphQLError(
|
||||||
|
f"DateTime cannot represent non-string value: {print_ast(node)}"
|
||||||
|
)
|
||||||
|
return cls.parse_value(node.value)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse_value(value):
|
def parse_value(value):
|
||||||
if isinstance(value, datetime.datetime):
|
if isinstance(value, datetime.datetime):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user