Skip to content

Commit

Permalink
chore: version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed May 11, 2024
1 parent 952b9d4 commit 807405a
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 9 deletions.
61 changes: 58 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 `[email protected]`.

## [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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)<br />
![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)<br />
![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)
Expand Down
2 changes: 1 addition & 1 deletion phpstan/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions wp-graphql-rank-math.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,7 +21,7 @@
* @package WPGraphQL\RankMath
* @author axepress
* @license GPL-3
* @version 0.2.0
* @version 0.3.0
*/

declare( strict_types = 1 );
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 807405a

Please sign in to comment.