Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: add GraphQL Debug message to response when attempting to use Page.seo for the Posts Archive. #113

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

justlevine
Copy link
Member

What

This PR adds a graphql_debug() message when null is returned from a Page.seo on the Posts archive

Why

Since WPGraphQL doesn't have an archive type, it treats the page_for_posts WP_Post object as a ContentType instead of content node. ( See the discussion on #2486 ).

As that's not readily obvious, a debug message directing them to use contentType or nodeByUri will let them know that it's returning null for a reason.
 
Closes #111

How

If the URI is null and the a Post model is for the Posts Page, logs a message to extensions.debug

Testing Instructions

Additional Info

image

Checklist:

  • My code is tested to the best of my abilities.
  • My code follows the WordPress Coding Standards.
  • My code has proper inline documentation.
  • I have added unit tests to verify the code works as intended.
  • The changes in this PR have been noted in CHANGELOG.md

@justlevine justlevine mentioned this pull request Aug 31, 2024
3 tasks
@justlevine justlevine merged commit 1cf41e1 into AxeWP:develop Aug 31, 2024
14 of 17 checks passed
@justlevine justlevine deleted the dev/posts-page-debug-notice branch August 31, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blog page seo returns null
1 participant