#133365 README пакета, описание в composer.json и описания полей GraphQL-схемы

This commit is contained in:
srybkin committed 2026-12-04 17:47:49 +04:00
1 parent f3c0f9d890
commit 7b8add6e24
7 files changed
+298 -16

No files matched your search

+10 -3
View File
@@ -5,6 +5,13 @@ namespace dominion\settings\schema;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
/**
* Одна настройка в GraphQL: код и значение из таблицы `settings`.
*
* Тип элементов поля `settings { data { … } }`. Поля не фильтруются по ролям
* (`Types::checkAccess` здесь не вызывается), доступ решает только корневое поле
* приложения — `settings` в QueryType/MutationType.
*/
class SettingsType extends ObjectType
{
public function __construct()
@@ -14,15 +21,15 @@ class SettingsType extends ObjectType
return [
'id' => [
'type' => Type::int(),
'description' => 'Id',
'description' => 'Id настройки',
],
'code' => [
'type' => Type::string(),
'description' => 'code',
'description' => 'Символьный код настройки (до 500 символов)',
],
'value' => [
'type' => Type::string(),
'description' => 'value',
'description' => 'Значение настройки, строка (сложные значения — JSON/CSV в ней же, до 5000 символов)',
],
];
}