Add GraphQL support for RankMath SEO
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.
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
}
}
}
}
}
}
Category.seo
changed type from RankMathSeo
to RankMathCategoryTermSeo
ContentNode.seo
changed type from RankMathSeo
to RankMathContentNodeSeo
HierarchicalContentNode.seo
changed type from RankMathSeo
to RankMathContentNodeSeo
MediaItem.seo
changed type from RankMathSeo
to RankMathMediaItemObjectSeo
Page.seo
changed type from RankMathSeo
to RankMathPageObjectSeo
Post.seo
changed type from RankMathSeo
to RankMathPostObjectSeo
PostFormat.seo
changed type from RankMathSeo
to RankMathPostFormatTermSeo
Tag.seo
changed type from RankMathSeo
to RankMathTagTermSeo
User.seo
changed type from RankMathSeo
to RankMathUserSeo
seo
field types to their implementations.rankMathSettings.homepage.description
field. Props @offminded 🙌RedirectionConnectionResolver
for v1.26.0 compatibility.[email protected]
.Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/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.
[!NOTE] Although this release technically contains breaking changes, these changes are limited to developers directly extending the wp-graphql-rank-math.php, activation.php, deactivation.php files, and the WPGraphQL\RankMath\Main class.
If you are using the plugin as intended, you should not experience any issues when upgrading.
ContentTypeSeo
and prevent fatal error when generating breadcrumbs. H/t @MonPetitUdtype
field in the Redirection
model to correctly return a ?string
.WPGraphQL/RankMath
namespace to root-level files ( activation.php
, deactivation.php
, wp-graphql-rank-math.php
).strict_types
in all PHP files.Autoloader
class.This minor release adds support for more social fields in the RankMathSocialMetaSettings
and RankMathUserSeo
types. Additionally, it fixes a bug where the seo.openGraph.image
field would fail to resolve if provided a string image.
There are no breaking changes.
additionalProfiles
field on RankMathSocialMetaSettings
. props: @colis 🙌facebookProfileUrl
, twitterUserName
, and additionalProfiles
social fields on RankMathUserSeo
. props: @colis 🙌seo.openGraph.image
field when parsed value is a string.Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.1.0...0.1.1
This minor release bumps the plugin version to 0.1.0! 🎉
Additionally, we fixed a few bugs regarding seo.openGraph
resolution, and deprecated a setting that was removed in RankMath v1.0.211.
There are no breaking changes in this release.
[!NOTE] The reason for the version bump is to make it easier to update future releases in accordance with our versioning policy.
While the plugin version number is indicative of the (projected) schema maturity and not the underlying code (which has been used in enteprise production environments for almost two years), the new features and improvements that would warrant major changes to the schema are currently blocked upstream.
By bumping to v0.1.0, we can continue to push patch releases in the meantime without users having to worry about breaking changes.
rankMathSettings.sitemaps.general.canPingSearchEngines
, as it was removed in RankMath v1.0.211.head
data fetching to load Rank Math modules more consistently.seo.OpenGraph
. H/t @joanpzenThis release was sponsored by Red Rocks Web Development 😍.
Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.16...0.1.0
Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.15...0.0.16
Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.14...0.0.15
SEO::$global_authordata
property to the UserSeo
model and make nullable.seo.breadcrumbs
resolution from the RankMathSeo
interface to the SEO
model.Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.13...0.0.14
breadcrumbTitle
, description
, and title
fields to their corresponding characters. H/t @sdegetausaxepress/wp-graphql-cs
ruleset for PHP_CodeSniffer.docs/reference/queries.md
, and add docs on querying redirections, and included WordPress actions and filters.Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.12...0.0.13
ContentNodeSeo
on revisions. Props @idfloodwp-graphql-yoast-seo
is installed.Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.11...0.0.12
OpenGraphMeta.image
field.Full Changelog: https://github.com/AxeWP/wp-graphql-rank-math/compare/0.0.10...0.0.11