GraphQL Mutations
Example GraphQL mutations with authentication.
To get started, login into Sleuth and open GraphiQL.
Create new Code Deployment
mutation CreateCodeDeployment($input: CreateCodeChangeSourceMutationInput!) {
createCodeChangeSource(input: $input) {
changeSource {
name
slug
repository {
provider
owner
name
url
}
notifyInSlack
includeInDashboard
}
}
}
{
"input": {
"projectSlug": "<test-project>",
"repository": {
"name": "<repo-name>",
"owner": "<repo-owner>",
"url": "https://gitlab.com/<repo-owner>/<repo-name>",
"provider": "GITLAB"
},
"name": "Test Code Deployment",
"deployTrackingType": "MANUAL",
"environmentMappings": {
"environmentSlug": "production",
"branch": "main"
},
"environmentMappings": {
"environmentSlug": "staging",
"branch": "main"
}
}
}
Supported values for the provider field are AZURE, BITBUCKET, CUSTOM_GIT, GITHUB, GITHUB_ENTERPRISE, or GITLAB.
{
"input": {
"projectSlug": "<test-project>",
"repository": {
"name": "<repo-name>",
"owner": "<repo-owner>",
"url": "https://gitlab.com/<repo-owner>/<repo-name>",
"provider": "GITLAB"
},
"name": "Test Code Deployment",
"deployTrackingType": "BUILD",
"environmentMappings": {
"environmentSlug": "production",
"branch": "main"
},
"environmentMappings": {
"environmentSlug": "staging",
"branch": "main"
},
"
}
}
Supported values for the provider field are AZURE, BITBUCKET, CUSTOM_GIT, GITHUB, GITHUB_ENTERPRISE, or GITLAB.
Last updated