A simple basic API
Included: removal of remains of GraphQL adaptation. IMO the after/before behaviour is actually pretty badly defined if entities can be deleted, and delivers complexity trying to fix behaviour that users generally expect and are comfortable coping with. Of course special cases _do_ justify going extra length to provide consistent pagination.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
|
||||
SELECT
|
||||
id,
|
||||
owner,
|
||||
name,
|
||||
notes,
|
||||
schedule,
|
||||
min_frequency,
|
||||
max_frequency,
|
||||
created_at
|
||||
FROM
|
||||
tasks
|
||||
WHERE
|
||||
owner = $1 AND ($2 IS NULL OR id > $2) AND ($3 IS NULL OR id < $3)
|
||||
ORDER BY created_at ASC
|
||||
LIMIT $4;
|
||||
owner = $1
|
||||
ORDER BY created_at ASC, id ASC
|
||||
LIMIT $2 OFFSET $3;
|
||||
|
||||
Reference in New Issue
Block a user