---
schema_version: "1"
id: fd4241d9c472c7dc9a6dcd379303b7bf35170e89a9d5f0338264ae0d557e91d3
title: Viewing GraphQL API Schemas and Run Queries
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/exchange/view-graphql-api-schemas-and-run-queries.md
canonical_url: https://docs.mulesoft.com/exchange/view-graphql-api-schemas-and-run-queries
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 317f0d44ad3a6e7358daed1262036060f6422568eb163e75c9e08799c575548d
description: MuleSoft Documentation Site
latest: true
---
---
product: Exchange
---

# Viewing GraphQL API Schemas and Run Queries

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Use the GraphQL console to explore and understand the available GraphQL schemas, and write, run, and
troubleshoot GraphQL queries. The console is an easy-to-use interface for API app developers to
interact with GraphQL APIs in Exchange. GraphQL APIs are schema definitions that contain the object
types and definitions that are used to interact with the API through the GraphQL specification. The
GraphQL console enables app developers to query an API that supports this language in a more
flexible way than REST. The console supports standard GraphQL query syntax. The console is located
in the asset details page.

![The asset details page showing the GraphQL console](/mulesoft/current/en-us/exchange/_images/ex-graphql-console.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td><strong>Schema</strong>: Use the Schema explorer to explore the GraphQL API schema types and documentation.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td><strong>Query</strong>: Use the Query editor to write and run queries.<div><ul><li><p><strong>Variables</strong>: Use this tab to enter variables to query.</p></li><li><p><strong>Headers</strong>: Use this tab to enter the header information to query.</p></li></ul></div></td></tr><tr><td><i data-value="3"></i><b>3</b></td><td><strong>Results</strong>: Use this panel to review and troubleshoot queries.</td></tr></tbody></table>

## Before You Begin

To use the GraphQL console, the Exchange Viewer permission is required. For more information, see
[Set User Access Permissions](https://docs.mulesoft.com/exchange/to-set-permissions).

## View GraphQL API Schemas

Explore the schema by inspecting the types, fields, and relationships defined in the schema to see a
visual representation of the data and operations. Use the Schema explorer to inspect the query
methods that are available in the API schema. The documentation explorer renders the information and
allows the ability to navigate through the documentation of the API.

Use the **Search content** box or keyboard shortcuts to search the schema documentation to find
relevant information about specific types, fields, or operations. The search results highlight the
search criteria in the corresponding sections of the documentation.

1.  In the Exchange landing page, click the **Any type** filter and select **GraphQL APIs** from the
    list.

2.  Select a GraphQL API from the results.

3.  In the navigation bar, click **Console**.

4.  In the **Schema** panel, review the schema documentation.

5.  Search the schema documentation using one of the following methods:

    1.  Click the three dots icon, select **Search for content**, and enter a keyword in the box.

    2.  Use the **CTRL+F** or **Command+F** keyboard shortcut and enter a keyword in the **Search
        content** box.

## Run a GraphQL Query

Use the query editor to write queries in the console and run them in real-time. Add fields without
knowing the specific syntax using autocomplete or **Control+Space**. The query editor is located in
the **Query** panel.

The **Results** panel provides immediate feedback and displays the results of the query and any
errors. To run queries, a GraphQL instance is required to query between the API instance.
Non-managed instances can be added to run the queries.

1.  In the **Query** panel, click **Clear** to the clear the editor.

2.  Click in the editor and start typing your query using autocomplete or press **Control+Space**.

3.  Click **Prettify** to improve the formatting of the query objects in the editor.

4.  Click **Copy**, then paste the query text into a text editor and share with others or save for
    later.

5.  In the **Variables** section, add any query variables to include in the query.

6.  In the **Header** section, add any header information to include in the query.

7.  From the **Instance selector**, select an available server instance to run the query. If there
    are no server instances available, the **Execute** button is disabled.

8.  To add a new a non-managed instance to run the query, click **Add new instance**.

9.  From the **Non-managed instances** page, click **Add new instance**.

10. Enter the name and URL of the instance and click the check icon.

11. Click **Execute**.

12. Validate the query results in the **Results** panel.

13. Click **Copy**, then paste the results into a text editor to share with others.

14. Click **Clear** to clear the results.

## See Also

- [Asset Details](https://docs.mulesoft.com/exchange/asset-details)
