
A Practical Guide to Jahia's GraphQL API
Jahia's GraphQL API unlocks headless delivery, content automation, and cross-platform integrations. This guide covers the queries and mutations you will use every day.
Jahia exposes its entire JCR content tree through a GraphQL API powered by graphql-dxm-provider. Whether you are building an Astro frontend, automating content seeding, or integrating a third-party system, this API is your primary interface.
Querying content starts with jcr { nodeByPath } or nodesByQuery for JCR-SQL2 based searches. The key pattern to remember: i18n properties require a language argument on the properties field — omitting it returns only non-localised property values.
Mutations follow the jcr { mutateNode { mutateProperty { setValue } } } pattern. You can chain multiple property mutations in a single request, and nest addChild calls to build an entire node tree in one round trip.
Always include the Origin header in every request: -H "Origin: http://localhost:8080". Omitting it returns a Permission denied error even with valid credentials — a known quirk of Jahia's CORS filter.
For headless delivery, always query from the live workspace using workspace: LIVE — the default workspace is default (draft), which your public frontend should never read from.