Code formatter
`Query: codeFormatter` Fetch details of a code formatter using the formatter shortcode.
Arguments
| Field | Type | Description |
|---|---|---|
| shortcode | String! | Shortcode of the code formatter. |
Sample Request
query {
codeFormatter(shortcode: "gofmt") {
id
name
shortcode
description
}
}Sample Response
{
"data": {
"codeFormatter": {
"id": "VHJhbnNmb3JtZXI6bGp6a3d6",
"name": "Go fmt",
"shortcode": "gofmt",
"description": "Gofmt formats Go programs..."
}
}
}codeFormatters
Query: codeFormatters Fetch details of all available code formatters on DeepSource.
Arguments
| Field | Type | Description |
|---|---|---|
| offset | Int | Number of items to skip from the beginning of the result set. |
| before | String | Returns items before this cursor. |
| after | String | Returns items after this cursor. |
| first | Int | Returns the first N items. |
| last | Int | Returns the last N items. |
| name_Icontains | String | Filter by name (case-insensitive). |
Sample Request
query {
codeFormatters {
edges {
node {
id
name
shortcode
description
}
}
}
}Sample Response
{
"data": {
"codeFormatters": {
"edges": [
{
"node": {
"id": "VHJhbnNmb3JtZXI6ZXJ6amFi",
"name": "dotnet-format",
"shortcode": "dotnet-format",
"description": "dotnet-format is a code formatter for dotnet..."
}
},
{
"node": {
"id": "VHJhbnNmb3JtZXI6bGp6a3d6",
"name": "Go fmt",
"shortcode": "gofmt",
"description": "Gofmt formats Go programs..."
}
}
]
}
}
}Objects
CodeFormatter
A code formatter on DeepSource.
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier for the code formatter. |
| name | String! | Name of the code formatter. |
| shortcode | String! | Unique identifier for this code formatter globally. |
| description | String! | Verbose description, written in Markdown. |
| logo | String | URL of the code formatter logo. |
| analyzer | Analyzer | Associated analyzer. |
| exampleConfig | String | Example configuration for this code formatter. |
CodeFormatterConnection
| Field | Type | Description |
|---|---|---|
| pageInfo | PageInfo! | Pagination data for this connection. |
| edges | [CodeFormatterEdge]! | Contains the nodes in this connection. |
| totalCount | Int | Total number of items in the connection. |
CodeFormatterEdge
A Relay edge containing a CodeFormatter and its cursor.
| Field | Type | Description |
|---|---|---|
| node | CodeFormatter | The item at the end of the edge. |
| cursor | String! | A cursor for use in pagination. |
Deprecated Queries
The following queries are deprecated and will be removed in a future version. Please migrate to codeFormatter and codeFormatters.
transformer
Query: transformer - Deprecated. Use codeFormatter instead.
query {
transformer(shortcode: "gofmt") {
id
name
shortcode
}
}transformers
Query: transformers - Deprecated. Use codeFormatters instead.
query {
transformers {
edges {
node {
id
name
shortcode
}
}
}
}