Skip to content

Commit

Permalink
Fixed nodatime types for nullable structs with hot chocolate (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll authored Jul 5, 2022
1 parent f25d656 commit 67a9fbb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/HotChocolate/Extensions/ISchemaBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,30 @@ public static ISchemaBuilder AddNodaTime(this ISchemaBuilder schemaBuilder)
.AddConvention<IFilterConvention>(
new FilterConventionExtension(
descriptor => descriptor
.BindRuntimeType<Duration, ComparableOperationFilterInputType<Duration>>()
.BindRuntimeType<DateTimeZone, ComparableOperationFilterInputType<DateTimeZone>>()
.BindRuntimeType<Duration, ComparableOperationFilterInputType<Duration>>()
.BindRuntimeType<Duration?, ComparableOperationFilterInputType<Duration>>()
.BindRuntimeType<Instant, ComparableOperationFilterInputType<Instant>>()
.BindRuntimeType<Instant?, ComparableOperationFilterInputType<Instant>>()
.BindRuntimeType<IsoDayOfWeek, ComparableOperationFilterInputType<IsoDayOfWeek>>()
.BindRuntimeType<IsoDayOfWeek?, ComparableOperationFilterInputType<IsoDayOfWeek>>()
.BindRuntimeType<LocalDateTime, ComparableOperationFilterInputType<LocalDateTime>>()
.BindRuntimeType<LocalDateTime?, ComparableOperationFilterInputType<LocalDateTime>>()
.BindRuntimeType<LocalDate, ComparableOperationFilterInputType<LocalDate>>()
.BindRuntimeType<LocalDate?, ComparableOperationFilterInputType<LocalDate>>()
.BindRuntimeType<LocalTime, ComparableOperationFilterInputType<LocalTime>>()
.BindRuntimeType<LocalTime?, ComparableOperationFilterInputType<LocalTime>>()
.BindRuntimeType<OffsetDateTime, ComparableOperationFilterInputType<OffsetDateTime>>()
.BindRuntimeType<OffsetDateTime?, ComparableOperationFilterInputType<OffsetDateTime>>()
.BindRuntimeType<OffsetDate, ComparableOperationFilterInputType<OffsetDate>>()
.BindRuntimeType<OffsetDate?, ComparableOperationFilterInputType<OffsetDate>>()
.BindRuntimeType<OffsetTime, ComparableOperationFilterInputType<OffsetTime>>()
.BindRuntimeType<OffsetTime?, ComparableOperationFilterInputType<OffsetTime>>()
.BindRuntimeType<Offset, ComparableOperationFilterInputType<Offset>>()
.BindRuntimeType<Offset?, ComparableOperationFilterInputType<Offset>>()
.BindRuntimeType<Period, ComparableOperationFilterInputType<Period>>()
.BindRuntimeType<ZonedDateTime, ComparableOperationFilterInputType<ZonedDateTime>>()
.BindRuntimeType<ZonedDateTime?, ComparableOperationFilterInputType<ZonedDateTime>>()
)
);

Expand Down

0 comments on commit 67a9fbb

Please sign in to comment.