For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Supported values for the provider field are AZURE, BITBUCKET, CUSTOM_GIT, GITHUB, GITHUB_ENTERPRISE, or GITLAB.

Last updated

Was this helpful?