-
Notifications
You must be signed in to change notification settings - Fork 15
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
✨ order series #14
✨ order series #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we blend?
src/resolvers/series.ts
Outdated
ORDER BY total DESC | ||
LIMIT $1 OFFSET $2; | ||
`, [limit, offset]) | ||
ORDER BY $1 $2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe leverage interfaces for this ?
enum OrderBy {
DESC = 'DESC',
ASC = 'ASC'
}
with string we are bit prone to some sql hack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏴☠️ Never trust user input
@vikiival that wasn't working because the query was transform like:
instead of:
we have to build query dinamicly beforehand. I've managed to setup the project, will do same change on spotlight next. |
viki has said that maybe we need to turn of server sorting something he is not opening mouth really loud so translating literally through my brain to keyboard at evening and it should work for series insights 👯♂️ |
@roiLeo I'm still getting weird behaviour |
because
we could try to setup default value or update |
Something will not work here, |
Will it blend?