Umbraco Heartcore
CMSCloudDXP
  • What is Umbraco Heartcore?
    • Compare with Umbraco CMS
  • Versions and updates
  • Getting Started
    • API Browser
    • Backoffice Users and API Keys
    • Building a project from scratch
    • Environments
    • GraphQL Playground
    • Preview
    • The Umbraco Cloud Portal
    • Tour of the Backoffice
    • Using the Forms API
    • Webhooks
    • Deployment workflow
      • Content and media transfer / restore
      • Structure deployments
  • API Documentation
    • API Documentation
      • Rate Limits
    • Content Delivery
      • Content
      • Media
      • Redirect API
    • Content Management
      • Umbraco Forms
      • Languages
      • Content
        • Content Types
      • Media
        • Media Types
      • Members
        • Member Groups
        • Member Types
      • Relations
        • Relation Types
    • GraphQL API
      • Filtering and Ordering
      • Property Editors
      • Schema Generation
      • Persisted Queries
  • Backoffice
    • Custom Grid Editors
  • Client Libraries
    • Client Libraries
    • .NET Core Console Application
    • Node.js Client library
    • .NET Client library
      • MVC Sample
      • Content Management Sample
  • Tutorials
    • Custom Grid Editors
    • Querying with GraphQL
    • Creating content with media
  • Release Notes
    • February 2024
    • April 2024
    • August 2024
    • September 2024
    • April 2025
Powered by GitBook
On this page
  • Accessing GraphQL Playground
  • Features
  • Documentation & Schema
  • Running GraphQL queries
  • Sending HTTP headers
  • Query variables
  • History
  • Prettify
  • Persisted Queries
  • Create a new persisted query
  • Update a persisted query
  • Delete a persisted query

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting Started

GraphQL Playground

Documentation for Umbraco Heartcore GraphQL Playground.

PreviousEnvironmentsNextPreview

Last updated 6 months ago

Was this helpful?

With the GraphQL query language, you will be able to limit the amount of data transferred to and from your Heartcore instance and the client by specifying exactly what kind of information you would like to get in your API calls.

You can test and build GraphQL queries directly in the backoffice-integrated GraphQL Playground.

In the Settings section in the Umbraco Backoffice, you will find the Headless tree. From there you can use the GraphQL Playground to test your queries against your project's schema.

The Playground comes with basic features such as real-time error highlighting, syntax highlighting, formatting, query history and more.

Accessing GraphQL Playground

  1. Log into the project backoffice

  2. Navigate to the Settings dashboard

  3. Find the Headless tree near the bottom of the navigation list

  4. Click on GraphQL

From there, you can start querying as soon as your content is published.

Features

Documentation & Schema

The GraphQL Playground's build-in documentation and schema browser can be found on the left toolbar

This button will open a panel that grants you a quick overview of how content is structured using the Document Types in your solution.

It also gives an idea of how to access specific properties on each Document Type, nested properties, and properties from compositions.

At the same time, it also explains relationships between specific objects and properties in your solution.

This will be updated automatically as you change the project's schema meaning Document Types, Data Types, Document Type Compositions, and Document Type Elements.

Running GraphQL queries

To run a query use the left side of the GraphQL Playground to type in your query - could be something as basic as getting the names of all your content pages:

{
  allContent {
    items {
      name
    }
  }
}

The Heartcore GraphQL endpoint only supports queries - other operation types, that is mutations and subscriptions, are not supported.

After that, press the "Play" button sitting in the center of the Playground. If the query is constructed correctly, the results will be loaded into the right section.

When you are satisfied with the result, you can copy the client URL (CURL) by clicking the COPY CURL button located in the top part of the Playground, next to the address bar.

Sending HTTP headers

GraphQL Playground supports requests with HTTP headers if an authorization token is needed. The HTTP HEADERS section can be accessed from the bottom-right corner of the Playground window. By default, it contains the umb-project-alias header, the alias of your Heartcore project. It is possible to add multiple headers.

Query variables

It is also possible to define variables for queries - such variables's values can be changed in the bottom-left corner of the Playground window, next to the HTTP HEADERS section.

History

If you happen to make an amazing query and afterward erase it by accident, you can re-use it by finding it in the History.

The History pane can be opened by clicking the history button in the toolbar to the left.

Prettify

The Playground gives you an option to "prettify" your query with a click of a button, which makes it easier for humans to read.

Persisted Queries

Create a new persisted query

  1. Click the Create Persisted Query button

  2. Enter a name for the query in the new query editor that appears

  3. Write your query in the editor

  4. Click the Save button

Update a persisted query

  1. Find the query you want to update in the persisted queries list

  2. Click on the name of the query

  3. Make your changes in the editor that appears with the query

  4. Click the Save button

Delete a persisted query

  1. Find the query you want to delete in the persisted queries list

  2. Click on the name of the query

  3. Click the action menu in the top right corner of the editor with the query

  4. Click the Delete button

  5. Confirm the deletion

To learn more about querying, visit our .

The Graphql playground supports . To access Persisted queries you have to go to the and click the persisted queries tab

API documentation for GraphQL
persisted Graphql queries
GraphQL Playground
Where to find GraphQL
Documentation and schema pane in the Playground
Sample query in the Playground
Sample query with variables in the Playground
Shows where the history button is
Schema Tab in the Playground
Persisted queries tab
Create persisted query
Update persisted query
Delete persisted query