-
Notifications
You must be signed in to change notification settings - Fork 466
Closed
Labels
status: in progressCurrently being worked onCurrently being worked ontype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Description
Description
If there is no location menu saved yet, instead of a response being an empty array, it is returning an array of random menu items from another location
Steps to reproduce
- Register a menu (eg.: functions.php)
register_nav_menus(
array(
'primary' => esc_html__('Primary menu', 'my-blocks'),
'secondary' => esc_html__('Secondary menu', 'my-blocks'),
'contact' => esc_html__('Contact menu', 'my-blocks'),
)
);
query NewQuery {
menuItems(where: {location: CONTACT}) {
nodes {
id
label
}
}
}
- The result is an aleatory items from primary and secondary instead of empty array in "nodes"
{
"data": {
"menuItems": {
"nodes": [
{
"id": "cG9zdDo0Ng==",
"label": "Platform"
},
{
"id": "cG9zdDo0Mw==",
"label": "facebook"
},
{
"id": "cG9zdDozNw==",
"label": "Privacy Policy"
},
]
}
}
}
Additional context
No response
WPGraphQL Version
Version 1.20.0
WordPress Version
6.4.2
PHP Version
8.2
Additional environment details
WPGraphQL Blocks - Version 2.1.1
Wordpress Multsites (directory)
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have disabled ALL plugins except for WPGraphQL.
- Yes
- My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
Metadata
Metadata
Assignees
Labels
status: 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

