How can we add a custom field for sorting? #3209
Unanswered
gojanpaolo
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hi @gojanpaolo This is not valid graphql. Input objects cannot have arguments foos(order: { bar(id: "baz"): ASC } }) This PR will fix your problem: What you can do meanwhile is exactly the same thing as in filtering :) builder.AddConvention(
new SortConventionExtension(
x => x.AddProviderExtension(
new QueryableSortProviderExtension(x =>
x.AddFieldHandler(new BarHandler()))))) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We're trying to add a custom field for sorting like so:
But we can't figure out how to properly set it up.
We tried:
But we're getting:
Ultimately, we'd like to extend the sorting feature that would allow us to handle the following query:
Beta Was this translation helpful? Give feedback.
All reactions