Skip to main content
Parked

Alternative way to work sort and first together of nested items when using edges

  • April 23, 2025
  • 2 replies
  • 15 views

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8

This issue was reported by a user at SLB where they encountered an unexpected behavior when sorting the runHistory field in GraphQL. It appears that the sorting might not be applied as expected when using first: 1 in the query.

type Workflow {
runHistory: [WorkflowRun]
}

type WorkflowRun {
endTime: Timestamp
}
query MyQuery {
listWorkflow {
items {
runHistory(sort: {endTime: DESC}, first: 1) {
items {
endTime
}
}
}
}
}

By running the above query, he expects the first WorkflowRun in runHistory to be the most recent. If the user changes first: 1 in the query to first: 10 then he's able to see WorkflowRun in descending order.

2 replies

Elka Sierra
MVP
Forum|alt.badge.img

Hi, 

After reviewing your request, we’ve decided to:
Status: Parked
Reason: While this concept holds potential, it requires further exploration and is not aligned with our current priorities.

This status means we’re not actively pursuing this idea at the moment, but we may revisit it in the future if priorities shift or new insights emerge.

We appreciate your understanding and value your contributions to improving our product. If you have further thoughts or other ideas to share, we’d be happy to hear them!

Best regards,
Elka
 


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8
  • Author
  • Seasoned Practitioner
  • July 15, 2025
NewParked