Implement graphql api client and update gui to display data
This commit is contained in:
+162
@@ -0,0 +1,162 @@
|
||||
schema {
|
||||
query: Query
|
||||
mutation: Mutation
|
||||
}
|
||||
"A credential for authenticating with the pipeline source host."
|
||||
type CloneCredential {
|
||||
"The id of the credential."
|
||||
id: String!
|
||||
"The name of the credential."
|
||||
name: String!
|
||||
"The secret for the credential."
|
||||
secret: String!
|
||||
"The credential type."
|
||||
type: String!
|
||||
"The username to user with the credential."
|
||||
username: String!
|
||||
}
|
||||
"A webhook for triggering pipelines"
|
||||
type Webhook {
|
||||
"The id of the webhook."
|
||||
id: String!
|
||||
"The secret used to validate the webhook."
|
||||
secret: String!
|
||||
"The format of the webhook."
|
||||
serverType: String!
|
||||
}
|
||||
""
|
||||
type Mutation {
|
||||
"Allow a secret to be accessed by a pipeline."
|
||||
addSecretToPipeline(
|
||||
""
|
||||
secretId: String,
|
||||
""
|
||||
pipelineId: String!
|
||||
): Pipeline
|
||||
"Create a new CloneCredential"
|
||||
createCloneCredential(
|
||||
""
|
||||
type: String!,
|
||||
""
|
||||
username: String!,
|
||||
""
|
||||
secret: String!,
|
||||
""
|
||||
name: String!
|
||||
): CloneCredential
|
||||
"Create a new pipeline"
|
||||
createPipeline(
|
||||
""
|
||||
name: String!,
|
||||
""
|
||||
url: String!,
|
||||
""
|
||||
pollInterval: Int,
|
||||
""
|
||||
cloneCredentialId: String
|
||||
): Pipeline
|
||||
"Create a new runner"
|
||||
createRunner(
|
||||
""
|
||||
name: String!
|
||||
): Runner
|
||||
"Create a new secret"
|
||||
createSecret(
|
||||
""
|
||||
name: String!,
|
||||
""
|
||||
secret: String!
|
||||
): Secret
|
||||
"Create a new webhook"
|
||||
createWebhook(
|
||||
""
|
||||
type: String!,
|
||||
""
|
||||
pipelineId: String!
|
||||
): Webhook
|
||||
"Remove a pipeline's access to a secret."
|
||||
removeSecretFromPipeline(
|
||||
""
|
||||
secretId: String,
|
||||
""
|
||||
pipelineId: String!
|
||||
): Pipeline
|
||||
"Set the CloneCredential used by a pipeline to clone the source repo"
|
||||
setPipelineCloneCredential(
|
||||
""
|
||||
cloneCredentialId: String,
|
||||
""
|
||||
pipelineId: String!
|
||||
): Pipeline
|
||||
}
|
||||
"A runner available for use inside of a pipeline."
|
||||
type Runner {
|
||||
"The id of the runner."
|
||||
id: String!
|
||||
"The name of the runner."
|
||||
name: String!
|
||||
"The token."
|
||||
token: String!
|
||||
}
|
||||
"A pipeline for running ci jobs"
|
||||
type Pipeline {
|
||||
"The configured credential for cloning the pipeline source."
|
||||
cloneCredential: CloneCredential
|
||||
"The id of the pipeline."
|
||||
id: String!
|
||||
"The name of the pipeline."
|
||||
name: String!
|
||||
"The polling interval for the pipeline."
|
||||
pollInterval: Int!
|
||||
"The list of runs for the pipeline."
|
||||
runs: [Run!]!
|
||||
"The list of secrets for the pipeline."
|
||||
secrets: [Secret!]!
|
||||
"The url of the pipeline."
|
||||
url: String!
|
||||
"The list of webhooks for the pipeline."
|
||||
webhooks: [Webhook!]!
|
||||
}
|
||||
"A secret available for use inside of a pipeline."
|
||||
type Secret {
|
||||
"The id of the secret."
|
||||
id: String!
|
||||
"The name of the secret."
|
||||
name: String!
|
||||
"The secret."
|
||||
secret: String!
|
||||
}
|
||||
""
|
||||
type Query {
|
||||
""
|
||||
CloneCredential(
|
||||
"The id of the requested credential."
|
||||
id: String!
|
||||
): CloneCredential
|
||||
""
|
||||
CloneCredentials: [CloneCredential]!
|
||||
""
|
||||
Pipeline(
|
||||
"The id of the requested pipeline."
|
||||
id: String!
|
||||
): Pipeline
|
||||
""
|
||||
Pipelines: [Pipeline]!
|
||||
""
|
||||
Runners: [Runner]!
|
||||
""
|
||||
Secrets: [Secret]!
|
||||
}
|
||||
"A pipeline run"
|
||||
type Run {
|
||||
"The id of the run."
|
||||
id: String!
|
||||
"The progress status of the run."
|
||||
inProgress: Boolean
|
||||
"The result of the run."
|
||||
result: Float
|
||||
"The stderr used to validate the run."
|
||||
stderr: String
|
||||
"The stdout used to validate the run."
|
||||
stdout: String
|
||||
}
|
||||
Reference in New Issue
Block a user