Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require inner join on offer if sorting by offer #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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