Closed amoyanoakqa closed 1 week ago
Thanks for reporting this @amoyanoakqa
Few follow-ups:
v1.28.1
as of time of writing)?Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math
. You skipped this. Does the issue persist with only these 3 plugins activated?Basically, WPGraphQL doesn't have an Archive
type, so the way the "Posts page" (I'm assuming what you mean by Blog
page) works is both finicky and has been subject to several fixes since WPGraphQL v1.22.x.
I'm pretty sure that by querying for page
(instead of contentType
, or even better nodeByUri
), you're casting the response to act as a Page
(with a seo: RankMathPageObjectSeo
shape), when it should be a ContentType
with the seo: RankMathPostTypeSeo
) which is why it's returning null
here (as a Page
it indeed should not have accessible SEO ), but without the above information I can't know for sure.
nodebyuri worked!!
Ty
Hey @amoyano ,
Page.seo
returns null for the Posts page. Hopefully will save others the headache you experienced 🤞
Description
All pages are working ok on the graphql query, except blog page returns null
Steps to reproduce
(obviously the page has rank math seo snippet data)
query blog($idType: PageIdType!, $id: ID!) { page(idType: $idType, id: $id) { title seo { title description canonicalUrl robots openGraph { alternateLocales description articleMeta { publishedTime modifiedTime } image { height secureUrl type url width } locale siteName title type updatedTime url twitterMeta { card creator description image site title } } } } }
// Vars { "idType": "DATABASE_ID", "id": "5" }
Returns
{ "data": { "page": { "title": "Blog", "seo": null } }, "extensions": { "debug": [ { "type": "DEBUG_LOGS_INACTIVE", "message": "GraphQL Debug logging is not active. To see debug logs, GRAPHQL_DEBUG must be enabled." } ] } }
Additional context
No response
Plugin Version
0.3.2
WordPress Version
6.6.1
WPGraphQL Version
1.22
RankMath SEO Version
6.6.1
Additional enviornmental details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math