graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Actions not returning arrays in correct order when used with relationships

Open shanecontinued opened this issue 4 years ago • 2 comments

The issue seems to be only when querying a relationship, in this case "user". I've confirmed that my service is sending them in the correct order.

My action:

extend type Query {
    leaderboard(offset: Int, limit: Int): [LeaderboardOutput]
}

type LeaderboardOutput {
    rank: Int!
    userId: uuid!
    points: Int!
}

My query:

query getLeaderboard {
  leaderboard {
    rank
    points
    user {
      username
      profile_photo {
        url
      }
    }
  }
}

If I remove the user relationship it returns properly.

shanecontinued avatar Aug 21 '20 17:08 shanecontinued

Still seeing this issue on v1.3.3 and not sure how to implement a workaround, since the relationship resolving is out of our hands. Any progress on this?

Thanks!

mbryk avatar Dec 09 '20 18:12 mbryk

Hi, I want to update that we are launching Hasura V3 (DDN) this month. In V3, we are able to rebuild the core engine in a manner that feature wise, works consistently across intents (data source, actions, code etc), and for any kind of joins. This problem is now solved in V3.

I would highly suggest to join us to see the full power of Hasura DDN at the Hasura Dev Day on April 16 🎉. Sign up here: https://hasura.io/dev-day. Can't make it? Sign up anyway and we'll send you the recording.

manasag avatar Apr 16 '24 06:04 manasag