Skip to main content

Arguments

FieldTypeDescription
shortcodeString!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

FieldTypeDescription
offsetInt
beforeString
afterString
firstInt
lastInt
name_IcontainsStringFilter 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.
FieldTypeDescription
idID!The unique identifier for the code formatter.
nameString!Name of the code formatter.
shortcodeString!Unique identifier for this code formatter globally.
descriptionString!Verbose description, written in Markdown.
logoStringURL of the code formatter logo.
analyzerAnalyzerAssociated analyzer.
exampleConfigStringExample configuration for this code formatter.

CodeFormatterConnection

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[CodeFormatterEdge]!Contains the nodes in this connection.
totalCountInt

CodeFormatterEdge

A Relay edge containing a CodeFormatter and its cursor.
FieldTypeDescription
nodeCodeFormatterThe item at the end of the edge.
cursorString!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
      }
    }
  }
}