forked from cerc-io/snowballtools-base
Nabarun Gogoi
ac7064afa5
* Display current deployment info in overview tab * Add assign domain dialog box in deployments * Add empty link for project settings in assign domain dialog box * Use react router dom link * Add sub domain to project entity * Add deployment url with custom generated string * Set nano id to deployment id * Add sub domain while creating new project * Use same id as in url * Update readme steps for production build * Update README --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
219 lines
2.9 KiB
TypeScript
219 lines
2.9 KiB
TypeScript
import { gql } from '@apollo/client';
|
|
|
|
export const getUser = gql`
|
|
query {
|
|
user {
|
|
id
|
|
name
|
|
email
|
|
createdAt
|
|
updatedAt
|
|
gitHubToken
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getProject = gql`
|
|
query ($projectId: String!) {
|
|
project(projectId: $projectId) {
|
|
createdAt
|
|
description
|
|
id
|
|
name
|
|
template
|
|
updatedAt
|
|
prodBranch
|
|
framework
|
|
repository
|
|
webhooks
|
|
icon
|
|
subDomain
|
|
organization {
|
|
id
|
|
name
|
|
}
|
|
owner {
|
|
id
|
|
name
|
|
email
|
|
}
|
|
deployments {
|
|
id
|
|
branch
|
|
isCurrent
|
|
status
|
|
title
|
|
updatedAt
|
|
commitHash
|
|
createdAt
|
|
environment
|
|
domain {
|
|
status
|
|
branch
|
|
createdAt
|
|
updatedAt
|
|
id
|
|
name
|
|
}
|
|
createdBy {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getProjectsInOrganization = gql`
|
|
query ($organizationId: String!) {
|
|
projectsInOrganization(organizationId: $organizationId) {
|
|
id
|
|
name
|
|
createdAt
|
|
description
|
|
framework
|
|
prodBranch
|
|
webhooks
|
|
repository
|
|
updatedAt
|
|
icon
|
|
subDomain
|
|
deployments {
|
|
id
|
|
branch
|
|
isCurrent
|
|
status
|
|
title
|
|
updatedAt
|
|
commitHash
|
|
createdAt
|
|
environment
|
|
domain {
|
|
status
|
|
branch
|
|
createdAt
|
|
updatedAt
|
|
id
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getOrganizations = gql`
|
|
query {
|
|
organizations {
|
|
id
|
|
name
|
|
createdAt
|
|
updatedAt
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getDeployments = gql`
|
|
query ($projectId: String!) {
|
|
deployments(projectId: $projectId) {
|
|
id
|
|
domain{
|
|
branch
|
|
createdAt
|
|
id
|
|
name
|
|
status
|
|
updatedAt
|
|
}
|
|
branch
|
|
commitHash
|
|
title
|
|
url
|
|
environment
|
|
isCurrent
|
|
status
|
|
createdAt
|
|
updatedAt
|
|
createdBy {
|
|
id
|
|
name
|
|
email
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getEnvironmentVariables = gql`
|
|
query ($projectId: String!) {
|
|
environmentVariables(projectId: $projectId) {
|
|
createdAt
|
|
environment
|
|
id
|
|
key
|
|
updatedAt
|
|
value
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getProjectMembers = gql`
|
|
query ($projectId: String!) {
|
|
projectMembers(projectId: $projectId) {
|
|
id
|
|
member {
|
|
id
|
|
name
|
|
email
|
|
isVerified
|
|
}
|
|
isPending
|
|
createdAt
|
|
updatedAt
|
|
permissions
|
|
}
|
|
}
|
|
`;
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getDomains = gql`
|
|
query ($projectId: String!) {
|
|
domains(projectId: $projectId) {
|
|
branch
|
|
createdAt
|
|
redirectTo {
|
|
id
|
|
name
|
|
branch
|
|
status
|
|
}
|
|
id
|
|
name
|
|
status
|
|
updatedAt
|
|
}
|
|
}
|
|
`;
|