Files
speckle-server/packages/frontend-2/lib/workspaces/graphql/queries.ts
T
Chuck Driesler e312110933 Automate Public Beta (#3472)
* feat(automate): query active user functions

* fix(automate): show automations to non-stream-owners

* feat(automate): associate function with workspace

* fix(automate): split functions page between user and example functions

* fix(automate): ugh

* fix(functions): use correct query type in different places

* fix(automate): workspace functions page

* feat(automate): query specific categories of functions

* fix(automate): checkpoint

* fix(workspaces): successful queries w local env

* fix(automate): createFunctionWithoutVersion

* fix(automate): successful associate function with workspace

* fix(automate): query and return workspaces on functions

* fix(automate): show current function workspace

* fix(automate): query functions in automation create dialog

* fix(automate): audit non-owner automation access

* refactor(automate): logs api can get the projectId from the path

* fix(automate): multiregion gql resolvers

* fix(automate): multiregion event listeners

* fix(automate): drop automationCount

* fix(automate): multiregion run status

* fix(automate): correctness

* fix(automate): successful usage of multiregion results

* fix(automate): actually finish event listeners

* chore(automate): fix tests fix tests

* fix(automate): fix tests but make it multiregion flavor

* fix(automate): logs endpoint

* fix(automate): inject projectid correctly

* fix(automate): drop user-source functions

* fix(automate): owners edit, others can view

* fix(automate): simplify queries, auto workspace association

* chore(automate): appease

* chore(automate): fix function types

* fix(automate): get to workspace functions from empty state

* chore(automate): death to all slugs

* fix(automate): no create automation from function

* fix(automate): hide workspace change, tweak role access

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-11-29 17:33:14 +01:00

109 lines
2.5 KiB
TypeScript

import { graphql } from '~~/lib/common/generated/gql'
export const workspaceAccessCheckQuery = graphql(`
query WorkspaceAccessCheck($slug: String!) {
workspaceBySlug(slug: $slug) {
id
}
}
`)
export const workspacePageQuery = graphql(`
query WorkspacePageQuery(
$workspaceSlug: String!
$invitesFilter: PendingWorkspaceCollaboratorsFilter
$token: String
) {
workspaceBySlug(slug: $workspaceSlug) {
...WorkspaceProjectList_Workspace
}
workspaceInvite(
workspaceId: $workspaceSlug
token: $token
options: { useSlug: true }
) {
id
...WorkspaceInviteBanner_PendingWorkspaceCollaborator
...WorkspaceInviteBlock_PendingWorkspaceCollaborator
}
}
`)
export const workspaceProjectsQuery = graphql(`
query WorkspaceProjectsQuery(
$workspaceSlug: String!
$filter: WorkspaceProjectsFilter
$cursor: String
) {
workspaceBySlug(slug: $workspaceSlug) {
id
projects(filter: $filter, cursor: $cursor, limit: 10) {
...WorkspaceProjectList_ProjectCollection
}
}
}
`)
export const workspaceFunctionsQuery = graphql(`
query WorkspaceFunctionsQuery($workspaceSlug: String!) {
...AutomateFunctionsPageHeader_Query
workspaceBySlug(slug: $workspaceSlug) {
id
name
automateFunctions {
items {
id
...AutomationsFunctionsCard_AutomateFunction
...AutomateAutomationCreateDialog_AutomateFunction
}
}
}
}
`)
export const workspaceInviteQuery = graphql(`
query WorkspaceInvite(
$workspaceId: String
$token: String
$options: WorkspaceInviteLookupOptions
) {
workspaceInvite(workspaceId: $workspaceId, token: $token, options: $options) {
...WorkspaceInviteBanner_PendingWorkspaceCollaborator
...WorkspaceInviteBlock_PendingWorkspaceCollaborator
}
}
`)
export const moveProjectsDialogQuery = graphql(`
query MoveProjectsDialog {
activeUser {
...MoveProjectsDialog_User
}
}
`)
export const validateWorkspaceSlugQuery = graphql(`
query ValidateWorkspaceSlug($slug: String!) {
validateWorkspaceSlug(slug: $slug)
}
`)
export const workspaceSsoByEmailQuery = graphql(`
query WorkspaceSsoByEmail($email: String!) {
workspaceSsoByEmail(email: $email) {
...AuthSsoLogin_Workspace
}
}
`)
export const workspaceSsoCheckQuery = graphql(`
query WorkspaceSsoCheck($slug: String!) {
workspaceBySlug(slug: $slug) {
...WorkspaceSsoStatus_Workspace
}
activeUser {
...WorkspaceSsoStatus_User
}
}
`)