Upcase type names
This commit is contained in:
parent
6c81069b27
commit
e5b9e261c5
2 changed files with 3 additions and 3 deletions
|
@ -124,7 +124,7 @@ class SchemaBuilder
|
||||||
: [$models[$responseModelNames]];
|
: [$models[$responseModelNames]];
|
||||||
|
|
||||||
foreach ($responseModels as $responseModel) {
|
foreach ($responseModels as $responseModel) {
|
||||||
$type = TypeRegistry::get($responseModel->getType());
|
$type = TypeRegistry::get(\ucfirst($responseModel->getType()));
|
||||||
$description = $route->getDesc();
|
$description = $route->getDesc();
|
||||||
$params = [];
|
$params = [];
|
||||||
$list = false;
|
$list = false;
|
||||||
|
|
|
@ -85,12 +85,12 @@ class TypeRegistry
|
||||||
|
|
||||||
$fields = [];
|
$fields = [];
|
||||||
|
|
||||||
$model = self::$models[$name];
|
$model = self::$models[\lcfirst($name)];
|
||||||
|
|
||||||
if ($model->isAny()) {
|
if ($model->isAny()) {
|
||||||
$fields['data'] = [
|
$fields['data'] = [
|
||||||
'type' => Type::string(),
|
'type' => Type::string(),
|
||||||
'description' => 'Data field',
|
'description' => 'Additional data',
|
||||||
'resolve' => static fn($object, $args, $context, $info) => \json_encode($object, JSON_FORCE_OBJECT),
|
'resolve' => static fn($object, $args, $context, $info) => \json_encode($object, JSON_FORCE_OBJECT),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue