v0.3.0 - 2024-05-11
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.
query GetContentNodeSeo {
contentNodes {
nodes {
... on Post {
seo {
# ✔️ This now works and is the **preferred** way,
# since `seo` is always a `RankMathPostObjectSeo` type.
...MyPostSeoFragment
# 🤷 The old way will still work but is now redundant.
... on RankMathPostObjectSeo {
...MyPostSeoFragment
}
# ❌ This needs to be removed, since `Post` isnt a `User`
... on RankMathUserSeo {
...MyUserSeoFragment
}
}
}
}
}
}Breaking Schema Changes
- Field
Category.seochanged type fromRankMathSeotoRankMathCategoryTermSeo - Field
ContentNode.seochanged type fromRankMathSeotoRankMathContentNodeSeo - Field
HierarchicalContentNode.seochanged type fromRankMathSeotoRankMathContentNodeSeo - Field
MediaItem.seochanged type fromRankMathSeotoRankMathMediaItemObjectSeo - Field
Page.seochanged type fromRankMathSeotoRankMathPageObjectSeo - Field
Post.seochanged type fromRankMathSeotoRankMathPostObjectSeo - Field
PostFormat.seochanged type fromRankMathSeotoRankMathPostFormatTermSeo - Field
Tag.seochanged type fromRankMathSeotoRankMathTagTermSeo - Field
User.seochanged type fromRankMathSeotoRankMathUserSeo
What's Changed
- feat!: Narrow
seofield types to their implementations. - fix: Correctly resolve
rankMathSettings.homepage.descriptionfield. Props @offminded 🙌 - dev: Update
RedirectionConnectionResolverfor 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.
New Contributors
- @offminded made their first contribution in #92
Full Changelog: 0.2.0...0.3.0