Skip to main content
StormyCMS

Query content

Send GraphQL requests from your server to https://api.stormycms.com/graphql with site credentials.

Terminal window
curl https://api.stormycms.com/graphql \
-H 'Content-Type: application/json' \
-H "x-client-id: $STORMY_CMS_CLIENT_ID" \
-H "x-client-secret: $STORMY_CMS_CLIENT_SECRET" \
--data '{"query":"query { pages(limit: 10, offset: 0) { id slug metadata { title } } }"}'

The response contains data.pages. Check the GraphQL errors array even when the HTTP request succeeds.

Look up a slug

Send this query with variables { "slug": "about" }:

query PageBySlug($slug: String!) {
pageBySlug(slug: $slug) {
id
slug
metadata {
title
description
}
components {
id
name
props {
name
value
}
childComponents {
id
name
props {
name
value
}
}
}
}
}

A missing slug returns null. This query selects one child level. Add childComponents selections for deeper content.

The typed client includes three child levels below each root. It cannot recover descendants omitted by the query.

For React rendering, use the typed client and mapping example. See the API reference for all query fields, pagination, and authentication requirements.

Last updated: 10/20/26, 1:09 AM

StormyCMS

The headless CMS where you own the editor.