From d1841d00a37c91907932a820a55fcdfc79188642 Mon Sep 17 00:00:00 2001 From: mmgyshoaf <130071844+mmgyshoaf@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:16:45 -0600 Subject: [PATCH 1/2] Update filter-exception.php Update for WP GraphQL 2.0 --- src/filter-exception.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/filter-exception.php b/src/filter-exception.php index 643dc6d..ed1a63c 100644 --- a/src/filter-exception.php +++ b/src/filter-exception.php @@ -18,16 +18,7 @@ class FilterException extends \Exception implements ClientAware { * * @return bool isSafe from ClientAware. */ - public function isClientSafe() { + public function isClientSafe(): bool { return true; } - - /** - * Relay ClientAware fn. - * - * @return string category from ClientAware. - */ - public function getCategory() { - return 'wp-graphql-filter-query plugin'; - } } From a68dd5b4e658840d474210afe33762d527027d60 Mon Sep 17 00:00:00 2001 From: mmgyshoaf <130071844+mmgyshoaf@users.noreply.github.com> Date: Mon, 3 Mar 2025 12:04:43 -0600 Subject: [PATCH 2/2] Update filter-query apply_filters_input priority --- src/filter-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filter-query.php b/src/filter-query.php index 2ba86e4..8e11e9e 100644 --- a/src/filter-query.php +++ b/src/filter-query.php @@ -37,7 +37,7 @@ class FilterQuery { public function add_hooks(): void { add_action( 'graphql_register_types', [ $this, 'extend_wp_graphql_fields' ] ); - add_filter( 'graphql_RootQuery_fields', [ $this, 'apply_filters_input' ], 20 ); + add_filter( 'graphql_RootQuery_fields', [ $this, 'apply_filters_input' ], 30 ); add_filter( 'graphql_connection_query_args', [ $this, 'apply_recursive_filter_resolver' ], 10, 2 ); }