Set dirty property instead of in registry from shutdown

This commit is contained in:
Jake Barnby committed 2022-10-13 12:59:32 +13:00
1 parent 5c5bdac3d9
commit a2b532ed22
3 files changed
+9 -5

No files matched your search

+7 -2
View File
@@ -16,7 +16,7 @@ use Utopia\Route;
class Schema
{
protected static ?GQLSchema $schema = null;
protected static bool $dirty = false;
protected static array $dirty = [];
/**
* @throws \Exception
@@ -30,7 +30,7 @@ class Schema
return $utopia;
});
if (!self::$dirty && self::$schema) {
if (!empty(self::$schema)) {
return self::$schema;
}
@@ -250,4 +250,9 @@ class Schema
'mutation' => $mutationFields
];
}
public static function setDirty(string $projectId): void
{
self::$dirty[$projectId] = true;
}
}