fix(graphql): query scope (#1184)

This commit is contained in:
Kyrch
2026-04-22 15:40:38 -03:00
committed by GitHub
parent 7fff5465c9
commit 14b55970fe
4 changed files with 5 additions and 5 deletions
@@ -5,12 +5,12 @@ declare(strict_types=1);
namespace App\GraphQL\Mutations\List;
use App\Concerns\GraphQL\RunMiddlewares;
use App\Exceptions\GraphQL\GraphQLAuthorizationException;
use App\Features\AllowExternalProfileManagement;
use App\Http\Middleware\Api\EnabledOnlyOnLocalhost;
use App\Models\List\ExternalProfile;
use Illuminate\Support\Arr;
use Laravel\Pennant\Middleware\EnsureFeaturesAreActive;
use Nuwave\Lighthouse\Exceptions\AuthorizationException;
class SyncExternalProfileMutation
{
@@ -30,7 +30,7 @@ class SyncExternalProfileMutation
throw_unless(
$profile->canBeSynced(),
GraphQLAuthorizationException::class,
AuthorizationException::class,
'This external profile cannot be synced at the moment.'
);
+1 -1
View File
@@ -17,5 +17,5 @@ extend type Query {
"Returns a listing of announcement resources given fields."
announcementPagination(
sort: [AnnouncementSort!] @sort
): [Announcement!]! @paginate @scope(name: "current")
): [Announcement!]! @paginate(scopes: ["current"])
}
+1 -1
View File
@@ -25,5 +25,5 @@ extend type Query {
dumpPagination(
where: _ @whereConditions(columnsEnum: DumpFilterableColumns, handler: "App\\GraphQL\\WhereConditions\\WhereConditionsHandler")
sort: [DumpSort!] @sort
): [Dump!]! @paginate @scope(name: "public")
): [Dump!]! @paginate(scopes: ["public"])
}
+1 -1
View File
@@ -24,5 +24,5 @@ type FeaturedTheme @model(class: "App\\Models\\Admin\\FeaturedTheme") {
extend type Query {
"Returns the first featured theme where the current date is between start_at and end_at dates."
currentfeaturedtheme: FeaturedTheme @scope(name: "current") @first(model: "App\\Models\\Admin\\FeaturedTheme")
currentfeaturedtheme: FeaturedTheme @first(model: "App\\Models\\Admin\\FeaturedTheme", scopes: ["current"])
}