Hotchocolate: Nullable fields are not sortable

Created on 17 Feb 2020  ยท  3Comments  ยท  Source: ChilliCream/hotchocolate

Per https://hotchocolategraphql.slack.com/archives/CD9TNKT8T/p1581887583149800

In version 10.3.5 with .UseSorting(), nullable fields such as DateTime? are not sortable by default.

Attempts to sort by such fields will throw the error "The specified input object field xxx does not exist."

Was able to work around it by creating a custom SortInputType, and explicitly marking the nullable field as sortable (descriptor.Sortable(i => i.MyNullableField);).

โ“ question

All 3 comments

Hi @hognevevle there is a fix already merged into 10.4.0. So, if you grab one of the 10.4.0 previews it should already work.

I am closing this issue since @PascalSenn already fixed it :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hundreder picture hundreder  ยท  3Comments

acelot picture acelot  ยท  4Comments

sascha-andres picture sascha-andres  ยท  4Comments

benmccallum picture benmccallum  ยท  5Comments

marcin-janiak picture marcin-janiak  ยท  4Comments