feat: allow global/database IDs in MenuItem connection where args ID inputs#2523
Conversation
|
Code Climate has analyzed commit 108f48a and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
|
Hi There, We are using Graph QL plugin and it was working fine. After today's update, to fetch only parent menu code is not working. To fetch parent menu only, we were using ParentID=0 in where condition and it was working fine but after today's update, it is returning all menu instead of parent menu only. Also, there is no new parameter for parent menu only in where condition. I want to first fetch all parent menu then child of parent. I am using currently below query. Can you please advise if any code changes needed in below query? Or it will resolve with new updates. query MyQuery { |
|
Thanks for the report. Will check it out and get it patched! |
|
@jasonbahl https://github.com/justlevine/wp-graphql/blob/108f48ae5a572b8d7530e2e3d0acba1ca75ba2c8/src/Data/Connection/MenuItemConnectionResolver.php#L53 should check that its also not equal to |
|
I have a PR in the works for this. |
|
Thanks for resolving issue, it is working fine in new updates. |
What does this implement/fix? Explain your changes.
This PR allows Comment connection where args with a type ID to accept either global IDs or database IDs.
This PR replaces #2340 , and requires #2521 to be merged as a prerequisite.
Does this close any currently open issues?
Part of #998
Any relevant logs, error output, GraphiQL screenshots, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Any other comments?
The
testMenuItemsQueryWithChildItemsUsingDatabaseParentIdwas removed, as it is covered bytestMenuItemsOrder(). Other tests were renamed to match their 'where' arg directly.Where has this been tested?
Operating System: Ubuntu 20.04 ( wsl2 + devilbox + php 8.0.19)
WordPress Version: 6.0.2