feat(workspaces): add query for fetching usage (#4306)

* WIP can create project

* WIP can create project more work

* complete body, stencil tests

* feat(shared): move workspace plan types into shared

* test progress wip

* feat(shared): add more logic to canCreateWorkspaceProject

* a few more tests, as a treat

* chore(authz): round out tests

* fixed loaders, new GQL checks, dataLoaders in auth loaders

* fix(authz): get workspace limits loader

* chore(authz): update loaders

* frontend fixed up to snuff

* fix(authz): fix workspace plans for tests

* fix(authz): classic

* feat(workspaces): emit plan usage from BE

* fix(authz): 0 counts

* fix(workspaces): fix counts for 0

* chore(workspaces): gqlgen

* fix(workspaces): update fragment to use new fields

* fix(workspaces): count regional projects correctly

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
This commit is contained in:
Chuck Driesler
2025-04-03 09:06:34 +01:00
committed by GitHub
parent 81b49ebcc0
commit 6cea72e4f8
16 changed files with 241 additions and 40 deletions
@@ -45,7 +45,7 @@ const dataLoadersDefinition = defineRequestDataloaders(
const results = await getWorkspacesProjectsCounts({
workspaceIds: ids.slice()
})
return ids.map((id) => results[id] ?? null)
return ids.map((id) => results[id])
})
},
workspaceDomains: {