Skip to content

Require inner join on offer if sorting by offer#12

Open
iworkinprogress wants to merge 4 commits intofxhash:masterfrom
iworkinprogress:fix/objkt-offer-sorting
Open

Require inner join on offer if sorting by offer#12
iworkinprogress wants to merge 4 commits intofxhash:masterfrom
iworkinprogress:fix/objkt-offer-sorting

Conversation

@iworkinprogress
Copy link

This PR proposes a change to the API that will automatically join the offer table when trying to sort Objkt by offerPrice or offerCreatedAt.

If the offer table isn't included then trying to use either of those sort options fails and throws a cryptic. It was not immediately clear that you needed to include a filter along with these sort options.

This change should allow this to work (which fails in production):

query {
  generativeToken(id: 20) {
    name
    id
    objkts(sort: {offerCreatedAt: "ASC"}) {
      name
    }
  }
}

Note:

  • I had difficulty getting these changes to appear in my development environment for additional testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant