Sorting by JsonElement property #7767
-
Hi, I’m trying to implement a custom sort on a JsonElement property in EF Core through GraphQL, using EF.Functions.JsonExtract. I’ve been able to create the custom sort input type but am facing issues with the sort expression not executing as expected. Here’s an overview of what I’ve done: Filter Input Custom Input type
Registering Input type and handler
Handler
The handler is registered, but the expression doesn’t seem to have an effect. The query isn’t sorting as expected. I’ve confirmed that the JsonExtract method works when used directly, but I’m unsure why it doesn’t translate to the correct query when used in the custom handler. Has anyone encountered this issue before? Is there something I’m missing in how I’m setting up the expression for dynamic sorting by a JSON property? Any feedback would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured out an implementation that worked for me, I needed create some operation handlers and enqueue them on the context. Concrete that can later be enqueued
Custom Handler that enqueues my custom expressions
|
Beta Was this translation helpful? Give feedback.
Figured out an implementation that worked for me, I needed create some operation handlers and enqueue them on the context.
Concrete that can later be enqueued