diff --git a/docs/services/graphql.md b/docs/services/graphql.md index 29a88ba149..15ab5aa489 100644 --- a/docs/services/graphql.md +++ b/docs/services/graphql.md @@ -4,7 +4,7 @@ The GraphQL services allows you to manipulate your Appwrite instance through a s > > The major difference comes from the way the data is returned. GraphQL returns the data in a structured format, giving you only the nodes you ask for, while REST returns the data in a flat format. > -> GraphQL has a single endpoint for all queries and mutations except file uploads, while the REST API has multiple endpoints for each type of action. +> GraphQL has a single endpoint for all queries and mutations, while the REST API has multiple endpoints for each type of action. > > Both APIs are fully compatible with each other, and you can use them together in the same project. > diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index d62c9f3fa1..8bc099c49e 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -153,6 +153,7 @@ class Mapper ]; } + // If model has no properties, explicitly add a 'status' field because GraphQL requires at least 1 field per type. if (!$model->isAny() && empty($model->getRules())) { $fields['status'] = [ 'type' => Type::string(), @@ -362,7 +363,7 @@ class Mapper private static function getUnionImplementation(string $name, array $object): Type { - // FIXME: Find a different way to do this + // TODO: Find a better way to do this switch ($name) { case 'Attributes':