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

fix: uri field is null when querying the page for posts uri #2792

Merged

Conversation

jasonbahl
Copy link
Collaborator

@jasonbahl jasonbahl commented Apr 19, 2023

What does this implement/fix? Explain your changes.

This fixes a bug in the NodeResolver where querying the posts page prevents the node from fully resolving properly.

failing test: https://github.com/wp-graphql/wp-graphql/actions/runs/4745816863/jobs/8428653391?pr=2792#step:8:816
passing test: https://github.com/wp-graphql/wp-graphql/actions/runs/4745911977/jobs/8428890823?pr=2792#step:8:813

Does this close any currently open issues?

closes #2791

Any other comments?

BEFORE

I can query a node by URI and get the node back, but the node returns null for the uri field 🤔. This is a bug. If a node can be identified by a uri, the node has a uri.

CleanShot 2023-04-19 at 10 43 30

AFTER

The uri field is output as expected 👏🏻

CleanShot 2023-04-19 at 10 44 28

@jasonbahl jasonbahl self-assigned this Apr 19, 2023
… post's page we want to get the post_type_object of the 'post' post type
@jasonbahl jasonbahl merged commit 5c88404 into wp-graphql:develop Apr 19, 2023
26 checks passed
@jasonbahl jasonbahl mentioned this pull request Apr 19, 2023
@coveralls
Copy link

Coverage Status

Coverage: 85.086%. Remained the same when pulling 87e19fb on jasonbahl:fix/#2791-node-by-uri-posts-page into e52d00c on wp-graphql:develop.

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.

Posts page not properly returning from nodeByUri query
3 participants