Explore the GraphQL schema
Many GraphQL clients are support browsing GraphQL schema by taking care of introspection. In this page, we will cover GraphiQL and Altair clients.
GraphiQL and Altair are open-source GraphQL clients that provide a descent tool to compose a query, execute it, and inspect the results. And as a bonus, they also allow you to browse GraphQL schema.
Before you begin, do not forget to configure the API endpoint and HTTP headers.
The screenshots below are done from GraphiQL. However, Altair provides the same functionality and you will not find any difficulties following the same instructions to explore the schema.
Open the Documentation Explorer
To open the GraphiQL Documentation Explorer, click the Docs link in the header of the response pane:
The Documentation Explorer opens and displays a list of available objects:
Objects in the Documentation Explorer use this syntax:
Find the type definition of an object
When you first open the Documentation Explorer pane, the
query root types display:
In this example,
query is the name of a root, and
Query is the type
Find the fields available for a type definition
Click on the type definition of a node to view the fields that it provides. The Documentation Explorer also displays descriptions of the nodes.
For example, click the Query type definition. The Documentation Explorer
displays the fields that
Query provides. In this example, the fields are
To explore the schema, click the names of objects and definitions. You can also use the search input (magnifying glass icon) and breadcrumb links in the header.
Find the arguments associated with a field
Click the type definition of the
viewer field (gold text) to list its
viewer field provides sub-fields that allow you to query
zones nodes take arguments to specify which dataset to
zones can take a filter of
ZoneFilter_InputObject type as an
argument. To view the fields available to filter, click
Find the datasets available for a zone
To view a list of the datasets available to query, click the zone type definition (gold text):
A list of datasets displays in the Fields section, each with list of valid
arguments and a brief description. Arguments that end with an exclamation mark
!) are required.
Use the search input (magnifying glass icon) to find specific datasets:
To select a dataset, click its name.
The definition for the dataset displays. This example shows the
Find the fields available for a dataset
To view the fields available for a particular dataset, click on its type definition (gold text).
For example, click the ZoneFirewallEventsAdaptive type definition to view
the fields available for the
The list of fields displays:
For more information on using GraphiQL, please visit this guide.