2024-01-17 08:52:15 +00:00
|
|
|
import { gql } from '@apollo/client';
|
|
|
|
|
|
|
|
export const getUser = gql`
|
|
|
|
query {
|
|
|
|
user {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
email
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
2024-01-31 13:21:53 +00:00
|
|
|
gitHubToken
|
2024-01-17 08:52:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-18 04:34:02 +00:00
|
|
|
|
2024-01-25 11:08:40 +00:00
|
|
|
export const getProject = gql`
|
|
|
|
query ($projectId: String!) {
|
|
|
|
project(projectId: $projectId) {
|
|
|
|
createdAt
|
|
|
|
description
|
|
|
|
id
|
|
|
|
name
|
|
|
|
template
|
|
|
|
updatedAt
|
|
|
|
prodBranch
|
|
|
|
framework
|
|
|
|
repository
|
|
|
|
webhooks
|
2024-01-29 11:01:03 +00:00
|
|
|
icon
|
2024-02-05 09:26:28 +00:00
|
|
|
subDomain
|
2024-02-02 08:34:26 +00:00
|
|
|
organization {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
}
|
2024-01-25 11:08:40 +00:00
|
|
|
owner {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
email
|
|
|
|
}
|
2024-01-29 11:01:03 +00:00
|
|
|
deployments {
|
|
|
|
id
|
|
|
|
branch
|
|
|
|
isCurrent
|
|
|
|
status
|
|
|
|
updatedAt
|
|
|
|
commitHash
|
|
|
|
createdAt
|
|
|
|
environment
|
|
|
|
domain {
|
|
|
|
status
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
id
|
|
|
|
name
|
|
|
|
}
|
2024-02-05 09:26:28 +00:00
|
|
|
createdBy {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
}
|
2024-01-29 11:01:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const getProjectsInOrganization = gql`
|
2024-02-07 13:11:54 +00:00
|
|
|
query ($organizationSlug: String!) {
|
|
|
|
projectsInOrganization(organizationSlug: $organizationSlug) {
|
2024-01-29 11:01:03 +00:00
|
|
|
id
|
|
|
|
name
|
|
|
|
createdAt
|
|
|
|
description
|
|
|
|
framework
|
|
|
|
prodBranch
|
|
|
|
webhooks
|
|
|
|
repository
|
|
|
|
updatedAt
|
|
|
|
icon
|
2024-02-05 09:26:28 +00:00
|
|
|
subDomain
|
2024-01-29 11:01:03 +00:00
|
|
|
deployments {
|
|
|
|
id
|
|
|
|
branch
|
|
|
|
isCurrent
|
|
|
|
status
|
|
|
|
updatedAt
|
|
|
|
commitHash
|
2024-02-14 08:55:50 +00:00
|
|
|
commitMessage
|
2024-01-29 11:01:03 +00:00
|
|
|
createdAt
|
|
|
|
environment
|
|
|
|
domain {
|
|
|
|
status
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
id
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
2024-01-25 11:08:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2024-01-18 04:34:02 +00:00
|
|
|
export const getOrganizations = gql`
|
|
|
|
query {
|
|
|
|
organizations {
|
2024-01-18 12:20:50 +00:00
|
|
|
id
|
|
|
|
name
|
2024-02-07 13:11:54 +00:00
|
|
|
slug
|
2024-02-02 08:34:26 +00:00
|
|
|
createdAt
|
|
|
|
updatedAt
|
2024-01-18 04:34:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-18 12:20:50 +00:00
|
|
|
|
|
|
|
export const getDeployments = gql`
|
|
|
|
query ($projectId: String!) {
|
|
|
|
deployments(projectId: $projectId) {
|
|
|
|
id
|
|
|
|
domain{
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
id
|
|
|
|
name
|
|
|
|
status
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
branch
|
|
|
|
commitHash
|
2024-02-14 08:55:50 +00:00
|
|
|
commitMessage
|
2024-02-05 09:26:28 +00:00
|
|
|
url
|
2024-01-18 12:20:50 +00:00
|
|
|
environment
|
|
|
|
isCurrent
|
|
|
|
status
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
2024-01-30 10:18:50 +00:00
|
|
|
createdBy {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
email
|
|
|
|
}
|
2024-01-18 12:20:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-23 11:47:02 +00:00
|
|
|
|
2024-01-25 05:14:51 +00:00
|
|
|
export const getEnvironmentVariables = gql`
|
|
|
|
query ($projectId: String!) {
|
|
|
|
environmentVariables(projectId: $projectId) {
|
|
|
|
createdAt
|
2024-01-30 13:47:55 +00:00
|
|
|
environment
|
2024-01-25 05:14:51 +00:00
|
|
|
id
|
|
|
|
key
|
|
|
|
updatedAt
|
|
|
|
value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2024-01-23 11:47:02 +00:00
|
|
|
export const getProjectMembers = gql`
|
|
|
|
query ($projectId: String!) {
|
|
|
|
projectMembers(projectId: $projectId) {
|
|
|
|
id
|
|
|
|
member {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
email
|
2024-02-01 10:04:17 +00:00
|
|
|
isVerified
|
2024-01-23 11:47:02 +00:00
|
|
|
}
|
2024-02-01 10:04:17 +00:00
|
|
|
isPending
|
2024-01-23 11:47:02 +00:00
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
permissions
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-24 14:47:43 +00:00
|
|
|
|
|
|
|
export const searchProjects = gql`
|
|
|
|
query ($searchText: String!) {
|
|
|
|
searchProjects(searchText: $searchText) {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
prodBranch
|
|
|
|
repository
|
|
|
|
createdAt
|
|
|
|
description
|
|
|
|
framework
|
|
|
|
prodBranch
|
|
|
|
webhooks
|
|
|
|
updatedAt
|
|
|
|
template
|
|
|
|
repository
|
|
|
|
organization {
|
|
|
|
id
|
|
|
|
name
|
2024-02-07 13:11:54 +00:00
|
|
|
slug
|
2024-01-24 14:47:43 +00:00
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-29 12:48:43 +00:00
|
|
|
|
|
|
|
export const getDomains = gql`
|
2024-02-06 08:48:06 +00:00
|
|
|
query ($projectId: String!, $filter: FilterDomainsInput) {
|
|
|
|
domains(projectId: $projectId, filter: $filter) {
|
2024-01-29 12:48:43 +00:00
|
|
|
branch
|
|
|
|
createdAt
|
2024-01-31 12:25:19 +00:00
|
|
|
redirectTo {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
branch
|
|
|
|
status
|
|
|
|
}
|
2024-01-29 12:48:43 +00:00
|
|
|
id
|
|
|
|
name
|
|
|
|
status
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|