diff --git a/src/class-config.php b/src/class-config.php index dca8008..1e16126 100644 --- a/src/class-config.php +++ b/src/class-config.php @@ -623,7 +623,8 @@ protected function register_graphql_field( $type_name, $field_name, $config ) { 'resolve' => function( $root, $args, $context, $info ) use ( $acf_field ) { $value = $this->get_acf_field_value( $root, $acf_field ); $terms = []; - if ( ! empty( $value ) && is_array( $value ) ) { + if ( ! empty( $value ) ) { + $value = is_array( $value ) ? $value : [ $value ]; foreach ( $value as $term ) { $terms[] = DataSource::resolve_term_object( (int) $term, $context ); }