-
Notifications
You must be signed in to change notification settings - Fork 468
🎯 Tracking: Resolving nodes by URI #2366
Copy link
Copy link
Closed
Labels
component: architectureRelating to fundamental architectural decisionsRelating to fundamental architectural decisionscomponent: queryRelating to GraphQL QueriesRelating to GraphQL Querieseffort: highMore than a weekMore than a weekimpact: highUnblocks new use cases, substantial improvement to existing feature, fixes a major bugUnblocks new use cases, substantial improvement to existing feature, fixes a major bugstatus: in progressCurrently being worked onCurrently being worked ontype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Milestone
Description
This is a tracker for all the issues with bad/missing results when resolving nodes by their URI.
The general problem stems from NodeResolver's attempt to replicate WP::parse_request with a provided uri. Assumingly, some of these are due to misordered conditionals, while others are missing edge cases.
Proposed Work
As I see it, the ideal solve requires 3 steps:
- Refactor
NodeResolverto make the code less complex, and easier to test/iterate on. ( chore: clean up and add comments to NodeResolver::resolve_uri() conditional logic. #2656 ) - Add missing
wpunittests toNodeByUriTestto bringNodeResolver::resolve_uri()to 100%. ( test: backfillnodeByUriquery testing #2659 ) - Fix existing bugs in resolver ( feat: Refactor NodeResolver::resolve_uri() to use WP_Query #2680 )
- Research and add support for other edge cases, using the issues below as a baseline.
Tracking:
- bug: fetching translated posts by uri #2066
- Receiving wrong contentType when idType is set to URI #1850
- nodeByUri does not return ContentType for Posts Page. #1687
- Querying non-existent single page by URI returns error instead of null #1639
- Post Format archives don't resolve with nodeByUri query #2190
- NodeByUri not resolving properly for media items #2178
- NodeByUri will not query WooCommerce products since v1.8.1 #2394
- URI inputs should sanitize anchor links from uris #1712
- Can't query
/shop/page by contentNode with uri argument when woocommerce is enabled (no wp-graphql-woocommerce required) #1910 - Querying for preview via asPreview argument doesn't work when querying by slug, uri idTypes #1673
- On ContentType union in nodeByUri returns incorrect isPostsPage #2514
- Date Archives don't resolve with
nodeByUriqueries #2191
If I missed an issue or if you have a use case not referenced by an existing issue, please share and I'll add it to the tracker.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component: architectureRelating to fundamental architectural decisionsRelating to fundamental architectural decisionscomponent: queryRelating to GraphQL QueriesRelating to GraphQL Querieseffort: highMore than a weekMore than a weekimpact: highUnblocks new use cases, substantial improvement to existing feature, fixes a major bugUnblocks new use cases, substantial improvement to existing feature, fixes a major bugstatus: in progressCurrently being worked onCurrently being worked ontype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Type
Projects
Status
✅ Done