Use Undefined instead of the now deprecated INVALID (#1143)

This commit is contained in:
Jayden Windle 2020-02-26 14:18:13 -06:00 committed by GitHub
parent ba5b7dd3d7
commit ac98be7836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ from __future__ import absolute_import
import datetime
from aniso8601 import parse_date, parse_datetime, parse_time
from graphql.error import INVALID
from graphql import Undefined
from graphql.language import StringValueNode
from .scalars import Scalar
@ -38,7 +38,7 @@ class Date(Scalar):
elif isinstance(value, str):
return parse_date(value)
except ValueError:
return INVALID
return Undefined
class DateTime(Scalar):
@ -68,7 +68,7 @@ class DateTime(Scalar):
elif isinstance(value, str):
return parse_datetime(value)
except ValueError:
return INVALID
return Undefined
class Time(Scalar):
@ -98,4 +98,4 @@ class Time(Scalar):
elif isinstance(value, str):
return parse_time(value)
except ValueError:
return INVALID
return Undefined