Brightspot CMS Developer Guide

Using the GraphQL explorer


The GraphQL explorer provides a visual way to build queries. This topic explains how to use the explorer.

Note
In order to gain access to the GraphQL explorer, your role must have developer permissions. For details, see Creating a role.

GraphQL Explorer Page.png GraphQL Explorer Page.png

Header

The GraphQL explorer header contains the following:
  • Schema selector—Displays the endpoint you are viewing and allows you to switch to viewing other endpoints.
  • Endpoint URL—The full URL of the endpoint. Clicking this URL opens a pop-up menu with the following additional options:
    • Site—Determines the site that drives what the URL is.
      • URL—Of the available site URLs, select the specific site URL you want to use.
    • Headers—Click add_circle_outline to add one of the following header types:
      • Client Header—From the Client list, select one of the available API clients to impersonate that client.
      • Custom Header—Enter a Name and a Value for the custom header.
      • Debug Header—Turns on debug mode for GraphQL queries.
      • Site Header—Sets a header that drives the determination of the current site.
  • Settings—Allows you to create a REST mapping or view the schema.
GraphQL header bar.png GraphQL header bar.png

Documentation pane

The Documentation pane contains icons to view additional features of the GraphQL explorer. This pane drives what is displayed in the Explorer pane.
  • Notebook—Reveals the Documentation pane, which includes root and schema types.
  • Rewind—Reveals a history of the queries you have built.
  • Folder—Shows or hides the Explorer pane.
  • Refresh—Re-fetches the schema in the Explorer pane.
  • Command—Opens a list of short keys for use in the explorer.
  • Gear—Opens a pop-up containing settings like whether headers should persist, light and dark mode, and an option to clear storage in the explorer.
GraphQL documentation pane.png GraphQL documentation pane.png

Explorer pane

The Explorer pane displays the query in a tree format. Clicking an item in the pane achieves the following results:
  • Inserts the field into the Query pane as part of a query.
  • If collapsed, expands the next tier of fields.
At the bottom of the pane, you can specify whether you are building a query or a mutation.
GraphQL explorer pane.png GraphQL explorer pane.png

Query pane

The Query pane contains the query you build from the schema. To the right are a number of icons. From top to bottom:
  • Execute Query—Executes the query.
  • Prettify Query—Reverts the query back to its more formatted version.
  • Minify Query—Condenses the size of the query to a single line that you can scroll.
  • Merge Fragments into Query—Merges fragments into the query.
  • Copy Query—Copies the query for use elsewhere.
  • Toggle Wrap Query—Wraps a minified query around to the next line, avoiding scrolling.
  • Toggle Deprecated Fields—Hides fields that have been deprecated.
GraphQL explorer pane.png GraphQL explorer pane.png

Variables pane

The Variables pane can be used to define and manage variables that can be used in your queries, helping to make them more dynamic or reusable.
GraphQL variables pane.png GraphQL variables pane.png

Results pane

The Results pane shows the results of an executed query.
GraphQL results pane.png GraphQL results pane.png

Previous Topic
Accessing the GraphQL explorer
Next Topic
Editorial content report APIs
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Modules
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Shopify
Apple News