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]];
|
||||
|
||||
foreach ($responseModels as $responseModel) {
|
||||
$type = TypeRegistry::get($responseModel->getType());
|
||||
$type = TypeRegistry::get(\ucfirst($responseModel->getType()));
|
||||
$description = $route->getDesc();
|
||||
$params = [];
|
||||
$list = false;
|
||||
|
|
|
@ -85,12 +85,12 @@ class TypeRegistry
|
|||
|
||||
$fields = [];
|
||||
|
||||
$model = self::$models[$name];
|
||||
$model = self::$models[\lcfirst($name)];
|
||||
|
||||
if ($model->isAny()) {
|
||||
$fields['data'] = [
|
||||
'type' => Type::string(),
|
||||
'description' => 'Data field',
|
||||
'description' => 'Additional data',
|
||||
'resolve' => static fn($object, $args, $context, $info) => \json_encode($object, JSON_FORCE_OBJECT),
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue