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-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-01-25 11:08:40 +00:00
|
|
|
owner {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
email
|
|
|
|
}
|
2024-01-29 11:01:03 +00:00
|
|
|
deployments {
|
|
|
|
id
|
|
|
|
branch
|
|
|
|
isCurrent
|
|
|
|
status
|
|
|
|
title
|
|
|
|
updatedAt
|
|
|
|
commitHash
|
|
|
|
createdAt
|
|
|
|
environment
|
|
|
|
domain {
|
|
|
|
status
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
id
|
|
|
|
name
|
|
|
|
isRedirected
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const getProjectsInOrganization = gql`
|
|
|
|
query ($organizationId: String!) {
|
|
|
|
projectsInOrganization(organizationId: $organizationId) {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
createdAt
|
|
|
|
description
|
|
|
|
framework
|
|
|
|
prodBranch
|
|
|
|
webhooks
|
|
|
|
repository
|
|
|
|
updatedAt
|
|
|
|
icon
|
|
|
|
deployments {
|
|
|
|
id
|
|
|
|
branch
|
|
|
|
isCurrent
|
|
|
|
status
|
|
|
|
title
|
|
|
|
updatedAt
|
|
|
|
commitHash
|
|
|
|
createdAt
|
|
|
|
environment
|
|
|
|
domain {
|
|
|
|
status
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
id
|
|
|
|
name
|
|
|
|
isRedirected
|
|
|
|
}
|
|
|
|
}
|
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-01-18 04:34:02 +00:00
|
|
|
projects {
|
|
|
|
id
|
|
|
|
owner {
|
|
|
|
id
|
2024-01-18 12:20:50 +00:00
|
|
|
name
|
2024-01-18 04:34:02 +00:00
|
|
|
}
|
|
|
|
deployments {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
name
|
|
|
|
repository
|
|
|
|
prodBranch
|
|
|
|
description
|
|
|
|
template
|
|
|
|
framework
|
|
|
|
webhooks
|
|
|
|
members {
|
|
|
|
id
|
2024-01-19 05:24:52 +00:00
|
|
|
permissions
|
|
|
|
member{
|
|
|
|
id
|
|
|
|
name
|
|
|
|
email
|
|
|
|
}
|
2024-01-18 04:34:02 +00:00
|
|
|
}
|
|
|
|
environmentVariables {
|
|
|
|
id
|
2024-01-19 06:35:06 +00:00
|
|
|
environments
|
|
|
|
key
|
|
|
|
value
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
2024-01-18 04:34:02 +00:00
|
|
|
}
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-18 12:20:50 +00:00
|
|
|
|
|
|
|
export const getDeployments = gql`
|
|
|
|
query ($projectId: String!) {
|
|
|
|
deployments(projectId: $projectId) {
|
|
|
|
id
|
|
|
|
domain{
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
isRedirected
|
|
|
|
id
|
|
|
|
name
|
|
|
|
status
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
branch
|
|
|
|
commitHash
|
|
|
|
title
|
|
|
|
environment
|
|
|
|
isCurrent
|
|
|
|
status
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
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
|
|
|
|
environments
|
|
|
|
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
|
|
|
|
}
|
|
|
|
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
|
|
|
|
createdAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2024-01-29 12:48:43 +00:00
|
|
|
|
|
|
|
export const getDomains = gql`
|
|
|
|
query ($projectId: String!) {
|
|
|
|
domains(projectId: $projectId) {
|
|
|
|
branch
|
|
|
|
createdAt
|
|
|
|
isRedirected
|
|
|
|
id
|
|
|
|
name
|
|
|
|
status
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|