redirecting to custom pages from forms (e.g. POST /members/edit-name?id=1337 -> /member/1337)
redirecting from queries (e.g. /me -> /member/1234)
uploading images (problems, badges)
the ability to kick off background jobs/tasks (synching with reccurly / paxton etc)
and to be able to fit those features in it would be nice to expand the types that queries and commands can return (and maybe even partially unify them)
To start with my plan would be change queries from returning {body: string, title: string} to instead return Page | Redirect
where Page = {body: string, title: string} and Redirect = {url: string}.
I like the idea of expanding the return type of queries to allow redirects. For success redirects after a command I'd suggest introducing a standard for an optional field that forms can submit as part of the request.
There are couple of features which we might want soon:
/members/edit-name?id=1337
->/member/1337
)/me
->/member/1234
)and to be able to fit those features in it would be nice to expand the types that
queries
andcommands
can return (and maybe even partially unify them)To start with my plan would be change
queries
from returning{body: string, title: string}
to instead returnPage | Redirect
wherePage = {body: string, title: string}
andRedirect = {url: string}
.