From 60eaa408cad508a723e06c5b5416d2d7f9d2688a Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Mon, 21 Sep 2026 14:34:34 +0200 Subject: [PATCH 1/2] fix: throw exception when an operation is not delared in ApiResource for parameter attributes on properties --- core/filters.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/filters.md b/core/filters.md index fbf442ee2c9..4306ae9771b 100644 --- a/core/filters.md +++ b/core/filters.md @@ -341,7 +341,7 @@ class Book #[QueryParameter(key: 'name', filter: new PartialSearchFilter(), operations: [new GetCollection()])] public string $name = ''; - // Applies only to GetCollection (Patch is not in the list of operations) + // Error: Patch is not declared in the resource operations #[HeaderParameter(key: 'X-Authorization', operations: [new GetCollection(), new Patch()])] public string $authToken = ''; } @@ -354,6 +354,9 @@ The restriction matches on the operation class, not on a single configured opera declares two `Get` operations with different URI templates, `operations: [new Get()]` applies the parameter to both of them. +Every operation listed in `operations` must be declared in the resource operations, otherwise an +error is thrown. + ### Filtering a Single Property Most of the time, a parameter maps directly to a property on your resource. For example, a From 38583185d3233cdb73358ee8ac62640bb1534f10 Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Mon, 12 Oct 2026 11:03:11 +0200 Subject: [PATCH 2/2] fix(metadata): allow GraphQL operations in parameter attributes on properties --- core/filters.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/filters.md b/core/filters.md index 4306ae9771b..b1fe1a52be4 100644 --- a/core/filters.md +++ b/core/filters.md @@ -354,8 +354,8 @@ The restriction matches on the operation class, not on a single configured opera declares two `Get` operations with different URI templates, `operations: [new Get()]` applies the parameter to both of them. -Every operation listed in `operations` must be declared in the resource operations, otherwise an -error is thrown. +Every operation listed in `operations` must be declared on the resource, either in `operations` or +in `graphQlOperations`, otherwise an error is thrown. ### Filtering a Single Property