AbsintheUtils.Scalars.StrictNaiveDateTime (absinthe_utils v0.0.1-main-d255e08b6c32fe6449757ed94e6abba8bb9a31e7)
View SourceThe StrictNaiveDateTime
scalar type represents a naive date and time without
timezone.
The output is an ISO8601 formatted string.
The input must be a naive datetime, without timezone offset.
Valid examples:
- 2020-01-01T00:00:00
- 2020-01-01 00:00:00
Invalid examples:
- 2020-01-01T00:00:00+00:00
- 2020-01-01T00:00:00+01:00
- 2020-01-01T00:00:00Z
- 2020-01-01 00:00:00Z
Usage:
Import the type in your schema import_types(AbsintheUtils.Scalars.StrictNaiveDateTime)
and you will be able
to use the :strict_naive_datetime
type.
Acknowledgements:
Based on the type naive_datetime
from Absinthe.Type.Custom
.