Skip to main content

GraphQL

Shio CMS provides a GraphQL API for querying content. GraphQL is ideal for decoupled frontends, mobile applications, and any scenario where you need to request exactly the data you need in a single request.


GraphiQL Console

Shio CMS includes a built-in GraphiQL interactive console for exploring and testing GraphQL queries:

http://localhost:2710/graphiql

The console provides:

  • Schema explorer — browse available types and fields
  • Auto-complete — type-ahead suggestions for queries
  • Query history — review and re-run previous queries
  • Documentation — inline documentation for all types

Querying Content

Query Posts

Retrieve posts from a specific folder:

{
posts(folderId: "folder-uuid") {
id
title
summary
postType
publishStatus
date
attributes {
name
value
}
}
}

Query a Single Post

{
post(id: "post-uuid") {
id
title
summary
postType
publishStatus
attributes {
name
value
}
}
}

Query Folders

{
folders(siteId: "site-uuid") {
id
name
parentFolder
children {
id
name
}
}
}

Query Sites

{
sites {
id
name
description
url
}
}

Use Cases

Use CaseWhy GraphQL
Single-Page ApplicationsFetch exactly the fields you need in one request
Mobile AppsMinimize payload size by selecting specific fields
Content AggregationCombine posts, folders, and site data in a single query
PrototypingUse GraphiQL to explore the content model interactively

Authentication

GraphQL queries require authentication. Use session-based authentication (same as the REST API) or configure API access as needed.


PageDescription
REST API ReferenceFull REST API endpoint documentation
Content ModelingPost Types and fields
Developer GuideDev environment and project structure