blackcube / graphql
GraphQL read-only API for Blackcube CMS
1.0.0
2026-09-04 10:33 UTC
Requires
- php: ^8.4
- blackcube/dcore: ^1.0
- httpsoft/http-message: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- webonyx/graphql-php: ^15.37
Requires (Dev)
- codeception/codeception: ^5.3
- codeception/module-asserts: ^3.3
- vlucas/phpdotenv: ^5.7
- yiisoft/db-mysql: ^2.0
- yiisoft/di: ^1.4
- yiisoft/event-dispatcher: ^1.1
- yiisoft/factory: ^1.3
- yiisoft/injector: ^1.2
- yiisoft/test-support: ^3.2
Suggests
- illuminate/http: Required for LaravelGraphqlMiddleware and GraphqlServiceProvider (^12.0)
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-04 11:01:29 UTC
README
Read-only GraphQL API for Blackcube CMS. Exposes Content, Tag, Menu, Language, Parameter, Author with their relations and elastic data, plus relevance-ranked full-text search. No mutations — query API for headless frontends.
Quickstart
composer require blackcube/graphql
{
contents(filters: { languageId: "fr" }) {
id
name
slug { path }
blocs {
elastic {
... on ElasticHero { title image }
}
}
}
}
Full-text search across published Contents and Tags, ranked by relevance:
{
search(query: "newsletter", pagination: { size: 10 }) {
contents { id name slug { path } }
tags { id name }
}
}
Integration
| Host | Wiring |
|---|---|
| Yii3 | auto-registered via config-plugin, POST route on routePrefix |
| Slim / PSR | $app->add($container->get(PsrGraphqlMiddleware::class)) |
| Laravel | register GraphqlServiceProvider, $middleware->append(LaravelGraphqlMiddleware::class) |
Documentation
- Installation — requirements, configuration, Yii/Slim/Laravel wiring
- Schema — root queries, types, filters, pagination, elastic types
- Integration — PSR, Yii and Laravel integration
License
BSD-3-Clause. See LICENSE.md.