-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
@tpreusse I'm against naming the graphql query / type |
@patte I agree that it doesn't make sense—here—in a redirection module. But it would make sense in |
Alright I get it. So let's keep this as is, redirections for documents and users, then add a (find) |
"id" uuid primary key not null default uuid_generate_v4(), | ||
"source" text not null, | ||
"target" text not null, | ||
"status" integer not null default 308, |
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.
should be 301
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.
only other regular value for redirect is 302
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.
308, strange ;)
} | ||
|
||
type queries { | ||
# empty response: 404 |
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.
null is fine for redirect and easier right? resource needs to be 404 ;)
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.
rm docu here—it is returning null and not returning a 404
{ | ||
"source": "/me", | ||
"target": "/~me", | ||
"status": 308 |
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.
301
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
…eletedAt in get affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
"createdAt" timestamptz default now(), | ||
"updatedAt" timestamptz default now(), | ||
"deletedAt" timestamptz, | ||
UNIQUE("source") |
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.
not unique with deletedAt
} | ||
|
||
type queries { | ||
# empty response: 404 |
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.
rm docu here—it is returning null and not returning a 404
redirections | ||
WHERE | ||
source = :source AND | ||
NOT (resource @> :resource) AND |
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.
is undefiend handled?
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
affects: @orbiting/backend-modules-redirections
TODOs: