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.seo
changed type fromRankMathSeo
toRankMathCategoryTermSeo
- Field
ContentNode.seo
changed type fromRankMathSeo
toRankMathContentNodeSeo
- Field
HierarchicalContentNode.seo
changed type fromRankMathSeo
toRankMathContentNodeSeo
- Field
MediaItem.seo
changed type fromRankMathSeo
toRankMathMediaItemObjectSeo
- Field
Page.seo
changed type fromRankMathSeo
toRankMathPageObjectSeo
- Field
Post.seo
changed type fromRankMathSeo
toRankMathPostObjectSeo
- Field
PostFormat.seo
changed type fromRankMathSeo
toRankMathPostFormatTermSeo
- Field
Tag.seo
changed type fromRankMathSeo
toRankMathTagTermSeo
- Field
User.seo
changed type fromRankMathSeo
toRankMathUserSeo
What's Changed
- feat!: Narrow
seo
field types to their implementations. - 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]
.
New Contributors
- @offminded made their first contribution in #92
Full Changelog: 0.2.0...0.3.0