From 242cd7dd3903a34b8c0d0c2db1ac09918143138c Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 6 Dec 2022 21:37:28 -0300 Subject: [PATCH 1/3] Replace deprecated function DataSource::resolve_post_object --- src/class-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class-config.php b/src/class-config.php index 6c95901..739d2bb 100644 --- a/src/class-config.php +++ b/src/class-config.php @@ -799,7 +799,7 @@ protected function register_graphql_field( string $type_name, string $field_name 'resolve' => function( $root, $args, $context, $info ) use ( $acf_field ) { $value = $this->get_acf_field_value( $root, $acf_field ); - return DataSource::resolve_post_object( (int) $value, $context ); + return $context->get_loader( 'post' )->load_deferred( (int) $value ); }, ]; break; From 6851985c0d2f5447d0005170f2f6c0afaa79b96c Mon Sep 17 00:00:00 2001 From: Yan Morin Date: Fri, 5 May 2023 10:24:04 -0400 Subject: [PATCH 2/3] fix(term): removing deprecated resolve_term_object function --- src/class-config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class-config.php b/src/class-config.php index 739d2bb..b0091a8 100644 --- a/src/class-config.php +++ b/src/class-config.php @@ -903,11 +903,11 @@ protected function register_graphql_field( string $type_name, string $field_name */ if ( ! empty( $value ) && is_array( $value ) ) { foreach ( $value as $term ) { - $terms[] = DataSource::resolve_term_object( (int) $term, $context ); + $terms[] = $context->get_loader( 'term' )->load_deferred( (int) $term ); } return $terms; } else { - return DataSource::resolve_term_object( (int) $value, $context ); + return $context->get_loader( 'term' )->load_deferred( (int) $value ); } }, ]; From c226c1b0c3da5a8928922cec2336a9c60f7f5e3f Mon Sep 17 00:00:00 2001 From: Jason Bahl Date: Tue, 23 Jan 2024 14:03:54 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 320adcd..d455912 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,24 @@ # WPGraphQL for Advanced Custom Fields +---- + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + +This plugin has gone through a complete re-architecture and this repository will soon be archived. + +We recommend you upgrade to the new WPGraphQL for ACF v2.0+ at your earliest convenience. + +The new version contains breaking changes, so update with caution. Below are some resources to help: + +- UPGRADE GUIDE: https://acf.wpgraphql.com/upgrade-guide +- NEW PLUGIN REPO: https://github.com/wp-graphql/wpgraphql-acf +- NEW PLUGIN ON WORDPRESS.ORG: https://wordpress.org/plugins/wpgraphql-acf +- NEW PLUGIN ON COMPOSER: https://packagist.org/packages/wp-graphql/wpgraphql-acf +- NEW PLUGIN ON WPPACKAGIST: https://wpackagist.org/search?q=wpgraphql-acf&type=any&search= + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 +---- + WPGraphQL for Advanced Custom Fields automatically exposes your ACF fields to the WPGraphQL Schema. - [Install and Activate](#install-and-activate)