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 ); } }, ];