Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+25 -16
View File
@@ -10,39 +10,48 @@
*/
namespace IPS\core\api\GraphQL;
use GraphQL\Type\Definition\ObjectType;
use IPS\Api\GraphQL\Types;
use IPS\core\api\GraphQL\Mutations\ChangeNotificationSetting;
use IPS\core\api\GraphQL\Mutations\DeleteAttachment;
use IPS\core\api\GraphQL\Mutations\Follow;
use IPS\core\api\GraphQL\Mutations\IgnoreUser;
use IPS\core\api\GraphQL\Mutations\MarkNotificationRead;
use IPS\core\api\GraphQL\Mutations\Messenger\AddConversationUser;
use IPS\core\api\GraphQL\Mutations\Messenger\LeaveConversation;
use IPS\core\api\GraphQL\Mutations\Messenger\RemoveConversationUser;
use IPS\core\api\GraphQL\Mutations\Unfollow;
use IPS\core\api\GraphQL\Mutations\UploadAttachment;
use function defined;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* Core mutationss GraphQL API
*/
abstract class _Mutation
abstract class Mutation
{
/**
* Get the supported query types in this app
*
* @return array
*/
public static function mutations()
public static function mutations() : array
{
return [
'follow' => new \IPS\core\api\GraphQL\Mutations\Follow(),
'unfollow' => new \IPS\core\api\GraphQL\Mutations\Unfollow(),
'markNotificationRead' => new \IPS\core\api\GraphQL\Mutations\MarkNotificationRead(),
'uploadAttachment' => new \IPS\core\api\GraphQL\Mutations\UploadAttachment(),
'deleteAttachment' => new \IPS\core\api\GraphQL\Mutations\DeleteAttachment(),
'ignoreMember' => new \IPS\core\api\GraphQL\Mutations\IgnoreUser(),
'changeNotificationSetting' => new \IPS\core\api\GraphQL\Mutations\ChangeNotificationSetting(),
'leaveConversation' => new \IPS\core\api\GraphQL\Mutations\Messenger\LeaveConversation(),
'removeConversationUser' => new \IPS\core\api\GraphQL\Mutations\Messenger\RemoveConversationUser(),
'addConversationUser' => new \IPS\core\api\GraphQL\Mutations\Messenger\AddConversationUser(),
'follow' => new Follow(),
'unfollow' => new Unfollow(),
'markNotificationRead' => new MarkNotificationRead(),
'uploadAttachment' => new UploadAttachment(),
'deleteAttachment' => new DeleteAttachment(),
'ignoreMember' => new IgnoreUser(),
'changeNotificationSetting' => new ChangeNotificationSetting(),
'leaveConversation' => new LeaveConversation(),
'removeConversationUser' => new RemoveConversationUser(),
'addConversationUser' => new AddConversationUser(),
];
}
}