diff --git a/CHANGELOG.md b/CHANGELOG.md index 3411c0d..85d4a46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,69 @@ # Changelog ## [Unreleased] + +## [0.3.0] + +This _major_ releases simplifies the GraphQL schema by narrowing the `seo` field types to their implementations. We've also bumped the minimum version of WPGraphQL to v1.26.0 and refactored the `RedirectionConnectionResolver` to use the improved lifecycle methods introduced in that release. + +### Upgrade Notes + +This release contains breaking changes to the schema. Instead of the `seo` field returning a generic `RankMathSeo` object, it now returns a more specific object based on the node type. For example, a `Post` node will return a `RankMathPostObjectSeo` object, while a `Category` node will return a `RankMathCategoryTermSeo` object. + +In _most_ cases, you should not need to update your queries, as the schema should resolve the correct type based on the node type. However, if you are using inline fragments on the `seo` field inside your query that are not actually resolvable, you will need to remove them from your queries. + +E.g. + +```graphql +query GetContentNodeSeo { + contentNodes { + nodes { + ... on Post { + seo { + # The old way will still work, + # but is now redundant. + ... on RankMathPostObjectSeo { + ...MyPostSeoFragment + } + + # This will now also work, and is the preferred way, + # since `seo` is always a `RankMathPostObjectSeo` type. + ...MyPostSeoFragment + + # This needs to be removed, since `Post` isnt a `User` + ... on RankMathUserSeo { + ...MyUserSeoFragment + } + } + } + } + } +} +``` + +### Breaking Schema Changes +- Field `Category.seo` changed type from `RankMathSeo` to `RankMathCategoryTermSeo` +- Field `ContentNode.seo` changed type from `RankMathSeo` to `RankMathContentNodeSeo` +- Field `HierarchicalContentNode.seo` changed type from `RankMathSeo` to `RankMathContentNodeSeo` +- Field `MediaItem.seo` changed type from `RankMathSeo` to `RankMathMediaItemObjectSeo` +- Field `Page.seo` changed type from `RankMathSeo` to `RankMathPageObjectSeo` +- Field `Post.seo` changed type from `RankMathSeo` to `RankMathPostObjectSeo` +- Field `PostFormat.seo` changed type from `RankMathSeo` to `RankMathPostFormatTermSeo` +- Field `Tag.seo` changed type from `RankMathSeo` to `RankMathTagTermSeo` +- Field `User.seo` changed type from `RankMathSeo` to `RankMathUserSeo` + +### What's Changed + - feat!: Narrow `seo` field types to their implementations. -- chore!: Bump minimum supported WPGraphQL version to v1.26.0. -- dev: Update `RedirectionConnectionResolver` for v1.26.0 compatibility. - fix: Correctly resolve `rankMathSettings.homepage.description` field. Props @offminded 🙌 +- dev: Update `RedirectionConnectionResolver` for v1.26.0 compatibility. +- chore!: Bump minimum supported WPGraphQL version to v1.26.0. - chore: Update Composer dev-dependencies to latest versions and address uncovered lints. +- chore: Update Strauss to v0.19.1 - tests: Update compatibility with `wp-graphql-test-case@3.0.1`. -## [0.2.0] + +## [0.3.0] This _major_ release refactors the plugin's root files to use the `WPGraphQL/RankMath` namespace. We've also added explicit support for WordPress 6.5 (including the new Plugin Dependencies feature), squashed a few bugs, and more. diff --git a/README.md b/README.md index bd99269..3a7c55a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Adds WPGraphQL support for [Rank Math SEO](https://rankmath.com/). Built with [W ----- -![Packagist License](https://img.shields.io/packagist/l/axepress/wp-graphql-rank-math?color=green) ![Packagist Version](https://img.shields.io/packagist/v/axepress/wp-graphql-rank-math?label=stable) ![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/AxeWP/wp-graphql-rank-math/0.2.0) ![GitHub forks](https://img.shields.io/github/forks/AxeWP/wp-graphql-rank-math?style=social) ![GitHub Repo stars](https://img.shields.io/github/stars/AxeWP/wp-graphql-rank-math?style=social)
+![Packagist License](https://img.shields.io/packagist/l/axepress/wp-graphql-rank-math?color=green) ![Packagist Version](https://img.shields.io/packagist/v/axepress/wp-graphql-rank-math?label=stable) ![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/AxeWP/wp-graphql-rank-math/0.3.0) ![GitHub forks](https://img.shields.io/github/forks/AxeWP/wp-graphql-rank-math?style=social) ![GitHub Repo stars](https://img.shields.io/github/stars/AxeWP/wp-graphql-rank-math?style=social)
![CodeQuality](https://img.shields.io/github/actions/workflow/status/axewp/wp-graphql-rank-math/code-quality.yml?branch=develop&label=Code%20Quality) ![Integration Tests](https://img.shields.io/github/actions/workflow/status/axewp/wp-graphql-rank-math/integration-testing.yml?branch=develop&label=Integration%20Testing) ![Coding Standards](https://img.shields.io/github/actions/workflow/status/axewp/wp-graphql-rank-math/code-standard.yml?branch=develop&label=WordPress%20Coding%20Standards) diff --git a/phpstan/constants.php b/phpstan/constants.php index 9b4b568..662d92f 100644 --- a/phpstan/constants.php +++ b/phpstan/constants.php @@ -6,4 +6,4 @@ */ define( 'WPGRAPHQL_SEO_PLUGIN_FILE', 'wp-graphql-rank-math.php' ); -define( 'WPGRAPHQL_SEO_VERSION', '0.2.0' ); +define( 'WPGRAPHQL_SEO_VERSION', '0.3.0' ); diff --git a/readme.txt b/readme.txt index d76ed61..32b94df 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Tested up to: 6.5.0 Requires PHP: 7.4 Requires Plugins: wp-graphql, seo-by-rank-math Requires WPGraphQL: 1.26.0 -Stable tag: 0.2.0 +Stable tag: 0.3.0 License: GPL-3 License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/wp-graphql-rank-math.php b/wp-graphql-rank-math.php index dd82483..f3f6681 100644 --- a/wp-graphql-rank-math.php +++ b/wp-graphql-rank-math.php @@ -7,7 +7,7 @@ * Author: AxePress * Author URI: https://github.com/AxeWP * Update URI: https://github.com/AxeWP/wp-graphql-rank-math - * Version: 0.2.0 + * Version: 0.3.0 * Text Domain: wp-graphql-rank-math * Domain Path: /languages * Requires at least: 6.0 @@ -21,7 +21,7 @@ * @package WPGraphQL\RankMath * @author axepress * @license GPL-3 - * @version 0.2.0 + * @version 0.3.0 */ declare( strict_types = 1 ); @@ -51,7 +51,7 @@ function constants(): void { // Plugin version. if ( ! defined( 'WPGRAPHQL_SEO_VERSION' ) ) { - define( 'WPGRAPHQL_SEO_VERSION', '0.2.0' ); + define( 'WPGRAPHQL_SEO_VERSION', '0.3.0' ); } // Plugin Folder Path.