Schema overview
A map of the DeepSource GraphQL API schema — root queries, nested queries, and all available mutations.
This page gives you a bird's-eye view of the API. Use it to find the right query or mutation, then follow the links for full details and examples.
Root Queries
These are top-level entry points you can call directly.
| Query | Description | Details |
|---|---|---|
viewer | Get the authenticated user's profile and accounts | Viewer |
account | Look up a DeepSource account (team or individual) | Account |
repository | Look up a repository and its analysis data | Repository |
run | Fetch an analysis run by UID or commit SHA | Analysis Run |
analyzer | Fetch a single analyzer by shortcode | Analyzer |
analyzers | List all available analyzers | Analyzers |
codeFormatter | Fetch a single code formatter by shortcode | Code Formatter |
codeFormatters | List all available code formatters | Code Formatters |
Nested Queries
These are accessed through the repository { ... } query.
| Field | Description | Details |
|---|---|---|
analysisRuns | Past analysis runs for the repository | Analysis Runs |
pullRequest(number) | Fetch a specific pull request by number | Pull Request |
issues | All issues raised in the default branch | Repository |
issueOccurrences | Issue occurrences in the default branch | Check |
ignoreRules | Ignore rules configured for the repository | Issue |
reports | Compliance and trend reports | Reports |
metrics | Code metrics (coverage, etc.) | Metrics |
enabledAnalyzers | Analyzers enabled in the repository | Analyzers |
targets | SCA targets (manifest/lockfile pairs) | Repository |
dependencyVulnerabilityOccurrences | Dependency vulnerability occurrences | Repository |
dependencyVulnerabilityOccurrence(id) | A specific vulnerability occurrence by ID | Repository |
target(id) | A specific SCA target by ID | Repository |
Queries are also available through account { ... }:
| Field | Description | Details |
|---|---|---|
repositories | Repositories belonging to the account | Repositories |
members | Team members (empty for individual accounts) | Team |
reports | Account-level reports | Reports |
suppressedIssues | Issues suppressed at the team level | Account |
Mutations
All mutations available in the API, grouped by area.
Repository management
| Mutation | Description | Details |
|---|---|---|
activateRepository | Activate analysis on a repository | Repository |
deactivateRepository | Deactivate analysis on a repository | Repository |
regenerateRepositoryDSN | Regenerate a repository's DSN | Repository |
updateRepositoryDefaultBranch | Change the default branch for analysis | Repository |
Quality gates
| Mutation | Description | Details |
|---|---|---|
updateRepositoryIssueCategorySetting | Configure issue category quality gates | Repository |
updateRepositoryIssuePrioritySetting | Configure issue priority quality gates | Repository |
updateRepositoryMetricSetting | Configure metric quality gates | Repository |
setRepositoryMetricThreshold | Set the threshold value for a metric | Metric |