Skip to content

GraphQL

Viglet Shio 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.


Shio 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

Retrieve posts from a specific folder:

{
posts(folderId: "folder-uuid") {
id
title
summary
postType
publishStatus
date
attributes {
name
value
}
}
}
{
post(id: "post-uuid") {
id
title
summary
postType
publishStatus
attributes {
name
value
}
}
}
{
folders(siteId: "site-uuid") {
id
name
parentFolder
children {
id
name
}
}
}
{
sites {
id
name
description
url
}
}

Use Case Why GraphQL
Single-Page Applications Fetch exactly the fields you need in one request
Mobile Apps Minimize payload size by selecting specific fields
Content Aggregation Combine posts, folders, and site data in a single query
Prototyping Use GraphiQL to explore the content model interactively

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


Page Description
REST API Reference Full REST API endpoint documentation
Content Modeling Post Types and fields
Developer Guide Dev environment and project structure