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:
2019-10-27 00:24:58 +02:00
parent fd264d3d41
commit ab791efe42
10 changed files with 81 additions and 57 deletions

View File

@@ -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;