Skip to content

Commit 3bceaca

Browse files
authored
Merge pull request #124 from wp-graphql/release/v2.0.0-beta.6.0.0
release: v2.0.0-beta.6.0.0
2 parents e2c8a30 + 6789828 commit 3bceaca

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 2.0.0-beta.6.0.0
4+
5+
### New Features
6+
7+
- [#114](https://github.com/wp-graphql/wpgraphql-acf/pull/114): feat: add pre filter for resolve type
8+
9+
### Chores / Bugfixes
10+
11+
- [#111](https://github.com/wp-graphql/wpgraphql-acf/pull/111): fix: oembed field type returns embed instead of URL entered to the field
12+
- [#112](https://github.com/wp-graphql/wpgraphql-acf/pull/112): fix: field groups on page templates not resolving
13+
- [#116](https://github.com/wp-graphql/wpgraphql-acf/pull/116): fix: error when querying `post_object`, `relationship` or `page_link` field nested on a `repeater` or `flexible_content` field
14+
- [#122](https://github.com/wp-graphql/wpgraphql-acf/pull/122): ci: update tests to run against WordPress 6.4
15+
316
## 2.0.0-beta.5.1.0
417

518
### Chores / Bugfixes

src/FieldType/Relationship.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,24 @@ public static function get_graphql_type( FieldConfig $field_config, AcfGraphQLFi
6363
$ids = $value;
6464
}
6565

66-
$ids = array_map(
67-
static function ( $id ) {
68-
if ( is_object( $id ) && isset( $id->ID ) ) {
69-
$id = $id->ID;
70-
}
71-
return absint( $id );
72-
},
73-
$ids
66+
$ids = array_filter(
67+
array_map(
68+
static function ( $id ) {
69+
if ( is_object( $id ) && isset( $id->ID ) ) {
70+
$id = $id->ID;
71+
}
72+
// filter out values that are not IDs
73+
// this means that external urls or urls to things like
74+
// archive links will not resolve.
75+
return absint( $id ) ?: null;
76+
},
77+
$ids
78+
)
7479
);
7580

7681
$resolver = new PostObjectConnectionResolver( $root, $args, $context, $info, 'any' );
7782

83+
7884
if ( $is_one_to_one ) {
7985
$resolver = $resolver->one_to_one();
8086
}

wp-graphql-acf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Description: Re-imagining the WPGraphQL for ACF plugin
55
* Author: WPGraphQL, Jason Bahl
66
* Author URI: https://www.wpgraphql.com
7-
* Version: 2.0.0-beta.5.1.0
7+
* Version: 2.0.0-beta.6.0.0
88
* Text Domain: wp-graphql-acf
99
* Requires PHP: 7.3
1010
* Requires at least: 5.9
@@ -29,7 +29,7 @@
2929
}
3030

3131
if ( ! defined( 'WPGRAPHQL_FOR_ACF_VERSION' ) ) {
32-
define( 'WPGRAPHQL_FOR_ACF_VERSION', '2.0.0-beta.5.1.0' );
32+
define( 'WPGRAPHQL_FOR_ACF_VERSION', '2.0.0-beta.6.0.0' );
3333
}
3434

3535
if ( ! defined( 'WPGRAPHQL_FOR_ACF_VERSION_WPGRAPHQL_REQUIRED_MIN_VERSION' ) ) {

0 commit comments

Comments
 (0)