-
Notifications
You must be signed in to change notification settings - Fork 468
Receiving wrong contentType when idType is set to URI #1850
Copy link
Copy link
Closed
Labels
needs: reproductionThis issue needs to be reproduced independentlyThis issue needs to be reproduced independentlystale?May need to be revalidated due to prolonged inactivityMay need to be revalidated due to prolonged inactivitytype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Milestone
Description
I have registered a custom post type. So when I query a page that has same slug/uri as the custom post type, I receive the custom post type instead. I tested this with contentNode as well. I have WP GraphQL Version 1.3.5 installed (WP 5.7).
So this ...
query getPageByURI {
page(id: "example", idType: URI) {
pageId
title
contentType {
node {
label
}
}
}
contentNode(id: "example", idType: URI, contentType: PAGE) {
contentType {
node {
label
}
}
... on Page {
pageId
}
... on CustomPostType {
customposttypeId
}
}
}
... returns this ...
{
"data": {
"page": {
"pageId": 12345,
"title": "Example",
"contentType": {
"node": {
"label": "CustomPostTypes"
}
}
},
"contentNode": {
"contentType": {
"node": {
"label": "CustomPostTypes"
}
},
"customposttypeId": 12345
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs: reproductionThis issue needs to be reproduced independentlyThis issue needs to be reproduced independentlystale?May need to be revalidated due to prolonged inactivityMay need to be revalidated due to prolonged inactivitytype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Type
Projects
Status
✅ Done