Comments
This commit is contained in:
parent
e3b5919e40
commit
b6e7e84d50
|
@ -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.
|
||||
>
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue