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
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|