Skip to content

Commit

Permalink
Merge pull request #195 from wp-graphql/main
Browse files Browse the repository at this point in the history
Main
  • Loading branch information
jasonbahl committed Apr 15, 2024
2 parents 071cfec + 153761c commit 5de366d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog

## 2.2.0

## New Features

- [#181](https://github.com/wp-graphql/wpgraphql-acf/pull/181): feat: update docs Date fields to link to the RFC3339 spec

### Chores / Bugfixes

- [#182](https://github.com/wp-graphql/wpgraphql-acf/pull/182): fix: admin_enqueue_scripts callback should expect a possible null value passed to it
- [#185](https://github.com/wp-graphql/wpgraphql-acf/pull/185): fix: clone field within a group field type returns null values
- [#189](https://github.com/wp-graphql/wpgraphql-acf/pull/189): fix: image fields (and other connection fields) not properly resolving when queried asPreview

## 2.1.2

### Chores / Bugfixes
Expand Down
14 changes: 13 additions & 1 deletion readme.txt
Expand Up @@ -4,7 +4,7 @@ Tags: GraphQL, ACF, API, NextJS, Faust, Headless, Decoupled, React, Vue, Svelte,
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Stable Tag: 2.1.2
Stable Tag: 2.2.0
License: GPL-3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -116,6 +116,18 @@ This release is a complete re-architecture of WPGraphQL for ACF, introducing bre

== Changelog ==

= 2.2.0 =

**New Features**

- [#181](https://github.com/wp-graphql/wpgraphql-acf/pull/181): feat: update docs Date fields to link to the RFC3339 spec

**Chores / Bugfixes**

- [#182](https://github.com/wp-graphql/wpgraphql-acf/pull/182): fix: admin_enqueue_scripts callback should expect a possible null value passed to it
- [#185](https://github.com/wp-graphql/wpgraphql-acf/pull/185): fix: clone field within a group field type returns null values
- [#189](https://github.com/wp-graphql/wpgraphql-acf/pull/189): fix: image fields (and other connection fields) not properly resolving when queried asPreview

= 2.1.2 =

**Chores / Bugfixes**
Expand Down
15 changes: 8 additions & 7 deletions tests/_support/WPUnit/AcfFieldTestCase.php
Expand Up @@ -1051,13 +1051,6 @@ public function testQueryFieldOnPostReturnsExpectedValue() {

public function testQueryFieldOnPostAsPreviewReturnsExpectedValue() {

// disable the block editor
add_filter('use_block_editor_for_post', '__return_false');

$field_key = $this->register_acf_field();

// Save data to the post
update_field( $field_key, $this->get_data_to_store(), $this->published_post->ID );

$fragment = $this->get_query_fragment();

Expand All @@ -1083,6 +1076,14 @@ public function testQueryFieldOnPostAsPreviewReturnsExpectedValue() {
$this->markTestIncomplete( 'get_preview_data_to_store() not defined' );
}

// disable the block editor
add_filter('use_block_editor_for_post', '__return_false');

$field_key = $this->register_acf_field();

// Save data to the post
update_field( $field_key, $this->get_data_to_store(), $this->published_post->ID );

$query = '
query AcfFieldOnPost ($id: ID! $asPreview:Boolean) {
post( id: $id idType: DATABASE_ID asPreview: $asPreview) {
Expand Down
4 changes: 2 additions & 2 deletions wpgraphql-acf.php
Expand Up @@ -4,7 +4,7 @@
* Description: WPGraphQL for ACF seamlessly integrates Advanced Custom Fields with WPGraphQL.
* Author: WPGraphQL, Jason Bahl
* Author URI: https://www.wpgraphql.com
* Version: 2.1.2
* Version: 2.2.0
* Text Domain: wpgraphql-acf
* Requires PHP: 7.3
* Requires at least: 5.9
Expand All @@ -31,7 +31,7 @@
}

if ( ! defined( 'WPGRAPHQL_FOR_ACF_VERSION' ) ) {
define( 'WPGRAPHQL_FOR_ACF_VERSION', '2.1.2' );
define( 'WPGRAPHQL_FOR_ACF_VERSION', '2.2.0' );
}

if ( ! defined( 'WPGRAPHQL_FOR_ACF_VERSION_WPGRAPHQL_REQUIRED_MIN_VERSION' ) ) {
Expand Down

0 comments on commit 5de366d

Please sign in to comment.