diff --git a/src/Appwrite/GraphQL/Builder.php b/src/Appwrite/GraphQL/Builder.php index 9c643d0a2..e86b4e0b6 100644 --- a/src/Appwrite/GraphQL/Builder.php +++ b/src/Appwrite/GraphQL/Builder.php @@ -329,16 +329,10 @@ class Builder $methodName = $namespace . \ucfirst($route->getLabel('sdk.method', '')); $responseModelNames = $route->getLabel('sdk.response.model', "none"); - if ($responseModelNames === "none") { - continue; - } - $responseModels = \is_array($responseModelNames) ? \array_map(static fn($m) => $response->getModel($m), $responseModelNames) : [$response->getModel($responseModelNames)]; - - foreach ($responseModels as $responseModel) { $type = self::getModelTypeMapping($responseModel, $response); $description = $route->getDesc(); diff --git a/tests/e2e/Services/GraphQL/GraphQLServerTest.php b/tests/e2e/Services/GraphQL/GraphQLServerTest.php index ea9691d1d..856688fbc 100644 --- a/tests/e2e/Services/GraphQL/GraphQLServerTest.php +++ b/tests/e2e/Services/GraphQL/GraphQLServerTest.php @@ -159,11 +159,10 @@ class GraphQLServerTest extends Scope $errorMessage = 'User (role: guest) missing scope (users.write)'; $this->assertEquals($errorMessage, $user['body']['errors'][0]['message']); - $this->assertIsArray($user['body']['data']); - $this->assertNull($user['body']['data']['users_deleteUser']); + $this->assertArrayNotHasKey('data', $user['body']); /** - * Delete the user with the reqiured scopes + * Delete the user with the required scopes */ $key = $this->getNewKey(['users.write']); $user = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([