Skip to main content
Skip table of contents

GraphQL Explorer

The GraphQL Explorer feature of Optimizer lets you write custom search queries for data about Jira objects (projects, boards, custom fields, etc.) using a language called GraphQL.

Most of the functionality provided by this feature can also be obtained using smart tables in Optimizer, but there are a couple of use cases which the Explorer can be more suitable, such as:

  • Users can drill down into information about particular configuration items, much like they can with the app’s smart tables; however, the Explorer can be more efficient where the exact items to explore are known as the user won't have to wait for entire smart tables to load at a time. This is an alternative to our Deep Dive feature that our more technical users may prefer.

  • Additionally, this feature can be used in a debugging capacity. If problems are experienced with the app’s smart tables, the GraphQL Explorer can run a query and immediately identify if the problem is UI-related or data-related. This information is invaluable to our supporting developers and can help speed up the resolution of any problems encountered.

This feature can be accessed via the navigation sidebar by clicking to expand Tools and then selecting GraphQL Explorer:

Initial GraphQL Explorer screen when accessed via the navigation side bar.

Example Usage

The following examples show the usage of GraphQL to extract data from your Jira instance:


Queries are added to the left side panel and can be executed with the run button (top right), or via the shortcut: Cntrl+Enter.

Query results are presented in the right side panel using the JSON format.

The following query is a simple one, requesting the key and name for a particular project with an ID of 10000:

GRAPHQL
{
  projects(id: 10000) {
    name
    key
  }
}

The following screenshot shows the results of the query, where the project with an ID of 10000 links to the “Accounts Receivable (AR)” project in the given Jira instance.


One of the main benefits of using the GraphQL Explorer is its ability to give you tailored interconnected information about Jira items. For instance, note in the following query that it requests information about not just custom fields but also the projects and issue types the custom field is used for. In the same query, we can explore whatever information we need about these objects, including other connected Jira objects like user information on project leads.

CODE
{
  customFields(id: 10106) {
    name
    projects {
      name
      lead {
        username
      }
    }
    issueTypes {
      name
    }
  }
}

The following screenshot shows the results of this query.

As an example of a use case for this query, suppose you're about to delete a custom field using Optimizer. You may have to find the project leads of all projects the custom field is being used in to notify them of the change being made. We have found this information using a simple query with the Explorer. For the example given, we have discerned that we would need to reach out to the tim.taylor, agrant-sd-demo, and jennifer.evans users.


Using various queries and fields made available through Optimizer, queries of increasing complexity can be created and tailored to purpose!

CODE
{
  projects {
    id
    key
    name
    projectType
    projectCategory {
      name
      id
      __typename
    }
    lead {
      displayName
      id
      key
      username
      email
      active
      avatar
      __typename
    }
    lastActiveDate
    avatar
    links
    style
    __typename
  }
}


The GraphQL Explorer feature has documentation to assist with querying (accessible via the Docs button in the top-right of the feature screen). The documentation details the queries and fields that are accessible via GraphQL regarding the Jira instance, as shown in the following screenshot:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.