- Notifications
You must be signed in to change notification settings - Fork928
Description
Currently if you attempt to fetch a deleted workspace, if it is deleted you need to include?deleted=true
query parameter. We also have ainclude_deleted
query param in the case that it will return regardless if it is deleted or not.
If you fetch workspaces, then the?deleted
query param only shows deleted workspace OR it shows active workspaces. It will never show a mixed set of deleted and active. From a UI perspective, this is kinda strange, as you'd assume there are cases you want the mixed set.
Proposal
We should keep only the?deleted
query param and treat it as follows:
deleted=""
: Show both deleted and active- This is the default case
- `deleted="false": Show only active
deleted="true"
: Show only deleted
The empty string applies no filters and returns the mixed set. We should add aDeleted
field toWorkspace
data type for the user to see the workspace status.
Reasoning
Fetching single
When fetching a single workspace, we already have theid
or thename
. We want to know if the workspace exists regardless of it's state. They should check theDeleted
field to know if it's active or not. I assume we might even allow the workspace to be brought back to life in the future?
If they want to only see active/deleted they can use thedeleted
query param
Fetching multiple
In our other filters we treat empty string as "do not apply the filter", so the same case goes here. We just need thatDeleted
field for the user to know the status.