Temporal types

Neo4j GraphQL supports all of the default GraphQL scalar types as well as additional scalar and object types specific to the Neo4j database, such as the temporal types.

Temporal types

Type Description Example

DateTime

ISO datetime string stored as a datetime temporal type.

type User {
    createdAt: DateTime
}

Date

"YYYY-MM-DD" date string stored as a date temporal type.

type Movie {
    releaseDate: Date
}

Duration

ISO 8601 duration string stored as a duration type.

Decimal values are not currently accepted on [YMWD]. Comparisons are made according to the Cypher Developer Guide.

type Movie {
    runningTime: Duration!
}

LocalDateTime

"YYYY-MM-DDTHH:MM:SS" datetime string stored as a LocalDateTime temporal type.

type Movie {
    nextShowing: LocalDateTime
}

Time

RFC3339 time string stored as a Time temporal type.

type Movie {
    nextShowing: Time
}

LocalTime

"HH:MM:SS[.sss+]" time string stored as a LocalTime temporal type.

type Movie {
    nextShowing: LocalTime
}