diff --git a/src/Appwrite/GraphQL/SchemaBuilder.php b/src/Appwrite/GraphQL/SchemaBuilder.php index b9442964e3..b1a1f48315 100644 --- a/src/Appwrite/GraphQL/SchemaBuilder.php +++ b/src/Appwrite/GraphQL/SchemaBuilder.php @@ -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; diff --git a/src/Appwrite/GraphQL/TypeRegistry.php b/src/Appwrite/GraphQL/TypeRegistry.php index 31504fc875..3fe6729d33 100644 --- a/src/Appwrite/GraphQL/TypeRegistry.php +++ b/src/Appwrite/GraphQL/TypeRegistry.php @@ -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), ]; }