Short answer: No, Joomla does not support GraphQL natively, as of Joomla 6. Joomla 4, 5 and 6 include a REST-style Web Services API (JSON:API format) instead. If you need GraphQL, you can build an endpoint with the webonyx/graphql-php library inside a custom Joomla extension, look for a third-party extension in the JED, or put a GraphQL gateway in front of Joomla’s REST API.
What Joomla offers today: the Web Services API
- Built into core since Joomla 4 and available in Joomla 5 and 6.
- Endpoints under
/api/index.php/v1/, for example/api/index.php/v1/content/articles. - Authentication with Joomla API tokens (enable the API Authentication and User – Joken plugins and create a token in the user profile).
- Each endpoint group is switched on or off with plugins in the Web Services plugin group, and developers can add endpoints for their own components.
curl -H "X-Joomla-Token: YOUR_TOKEN" \
"https://example.com/api/index.php/v1/content/articles?page[limit]=5"
REST vs GraphQL for Joomla
| Joomla Web Services (REST) | GraphQL layer | |
|---|---|---|
| In core | Yes | No, custom or third-party |
| Requests for related data | Often several requests | One query can fetch nested data |
| Payload | Fixed per endpoint | Client chooses the fields |
| Caching | Simple HTTP caching | Needs query-aware caching |
| Maintenance | Updated with Joomla | You maintain the schema and resolvers |
| Best for | Integrations, mobile apps, simple headless sites | Complex headless front ends |
How to add GraphQL to Joomla
Option 1: A custom component or plugin with graphql-php
Install webonyx/graphql-php with Composer inside your extension, define types that map to Joomla data, and resolve them through Joomla’s models or database layer. A minimal schema:
composer require webonyx/graphql-php
use GraphQL\GraphQL;
use GraphQL\Type\Schema;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
$article = new ObjectType([
'name' => 'Article',
'fields' => ['id' => Type::int(), 'title' => Type::string(), 'alias' => Type::string()],
]);
$schema = new Schema(['query' => new ObjectType([
'name' => 'Query',
'fields' => ['articles' => [
'type' => Type::listOf($article),
'resolve' => fn() => $db->setQuery(
$db->getQuery(true)->select('id, title, alias')->from('#__content')->where('state = 1')
)->loadAssocList(),
]],
])]);
$result = GraphQL::executeQuery($schema, $input['query'])->toArray();
In production, respect access levels and published state in every resolver, require authentication for anything non-public, and limit query depth and complexity.
Option 2: A GraphQL gateway in front of the REST API
Run a small Node.js service (for example Apollo Server or GraphQL Yoga) whose resolvers call Joomla’s Web Services API. Joomla stays untouched, and the front end gets one GraphQL endpoint.
Option 3: Third-party extensions
Search the Joomla Extensions Directory for “GraphQL”. Check Joomla 5/6 compatibility, the last update date and how it handles access control before relying on one.
Will Joomla add native GraphQL?
There is no GraphQL feature on Joomla’s published roadmap at the time of writing (October 2026). Watch the Joomla developer network for changes. For now, the Web Services API is the supported route.
Related guides and services
Frequently asked questions
Does Joomla support GraphQL?
Not in core. Joomla 4, 5 and 6 ship a REST-style Web Services API (JSON:API format) under /api/. GraphQL needs a custom plugin or component, a third-party extension, or a GraphQL layer in front of the REST API.
What API does Joomla have instead?
The Joomla Web Services API, added in Joomla 4. It exposes articles, categories, users, contacts and more under /api/index.php/v1/, authenticated with API tokens and controlled by plugins in the Web Services group.
Can I use Joomla as a headless CMS with Next.js?
Yes. Use the Web Services API (or a custom GraphQL layer) to fetch content and render it in Next.js, Nuxt or another front end.
How do I add a GraphQL endpoint to Joomla?
Install webonyx/graphql-php with Composer in a custom Joomla component or plugin, define a schema whose resolvers read Joomla models, and expose it on one route with authentication and query-depth limits.
Is REST or GraphQL better for Joomla?
For most integrations the built-in REST API is enough and easier to maintain. GraphQL pays off when a front end needs many related data types in one request.
