# Changing order from descending to ascending produces empty results in query with cascade and pagination

**URL:** <https://discuss.dgraph.io/t/changing-order-from-descending-to-ascending-produces-empty-results-in-query-with-cascade-and-pagination/15229>\
**Category:** GraphQL\
**Tags:** status:accepted, kind:bug, ticket:created\
**Created:** [August 7, 2021, 6:43pm UTC](https://discuss.dgraph.io/t/changing-order-from-descending-to-ascending-produces-empty-results-in-query-with-cascade-and-pagination/15229 "2021-08-07T18:43:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielhr](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@danielhr](https://discuss.dgraph.io/u/danielhr)\
**Post date:** [August 7, 2021, 6:43pm UTC](https://discuss.dgraph.io/t/changing-order-from-descending-to-ascending-produces-empty-results-in-query-with-cascade-and-pagination/15229/1 "2021-08-07T18:43:17Z")

</div>

## Report a Dgraph Bug

### What version of Dgraph are you using?

> **Dgraph (Cloud) Version: v21.03.0-58-g17f52bc78**
>

I’m running a particular GraphQL query that returns an empty result when changing the ordering of the elements from `desc` to `asc`. I also noticed this happens only for certain values of `category`. I don’t know if this might be somehow related to [this issue](http://discuss.hypermode.com/t/cascade-directive-with-pagination-produces-unexpected-results/8862).

This query returns results:

```auto
  queryProduct(first: 32, order: {desc: uploadedOn}, filter: {has: [currentPrice, sizes, thumbUrl]}) @cascade(fields: ["category"]) {
    id
    category(filter: {name: {eq: "Tacones"}}) {
      name
    }
  }

```

This one doesn’t

```auto

  queryProduct(first: 32, order: {asc: uploadedOn}, filter: {has: [currentPrice, sizes, thumbUrl]}) @cascade(fields: ["category"]) {
    id
    category(filter: {name: {eq: "Tacones"}}) {
      name
    }
  }

```

 ![dgraph_bug_orderby](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/c/cb6bddee5defa42fdcff7655275638ec7d093063.png)

### Expected behaviour and actual result.

The query with ascending order should also return results. It is very important in the project I’m developing to be able to change the ordering criteria without it having unexpected results, so I’d greatly appreciate any insights anyone could provide as to why this is happening.
