feat: allow global/db ids in comment mutation ID inputs#2328
feat: allow global/db ids in comment mutation ID inputs#2328jasonbahl merged 2 commits intowp-graphql:developfrom
Conversation
|
@jasonbahl this is proof of concept Once I get feedback/approval on this, I'll start work on the other mutations, then connections. |
jasonbahl
left a comment
There was a problem hiding this comment.
@justlevine this is wonderful! 👏🏻
I like the iterative approach you're taking as well, tackling small bits at a time.
Have you done a pretty thorough audit and have a list of all the fields that need to be addressed?
I wonder if it might make sense to create a feature branch for this, which is opened as a PR to develop, then we can make small iterative PRs to that feature branch, and work toward a larger merge with several of these PRs accumulated?
Maybe use one Issue and some checkboxes as well to track what inputs need to be changed, etc?
Could help us with this current phase, but also help us set up for when we're ready to make the breaking changes (changing Int to ID in various places).
|
Code Climate has analyzed commit 5ca7196 and detected 0 issues on this pull request. View more on Code Climate. |
5ca7196 to
7985677
Compare
|
Sorry, accidentally pushed media items to this PR, just reverted.
I was going to, but then I realized its just a simple search for I can take a beat and write them out if you want.
Your call. I personally try to avoid feature branches whenever for the same reason I'm submitting these PRs piecemeal - merge conflicts are a PITA. If you're looking to prep for a near-term release and are worried about confusing users by enhancing the mutations/connection args incrementally, then feature branch is probably the way to go. But I can also make the argument that since the accepted Without being too optimistic, updating mutation inputs is pretty straightforward. The only thing that might slow me down is backfilling missing tests. Connections are going require a larger discussion over in #998 - the question of where in the lifecycle to make the change needs to be thought out foundationally (e.g. is the db or global id saved to |

What does this implement/fix? Explain your changes.
This PR enables users to supply either a database ID or a global ID to comment mutation inputs of
typeID. Part of #998 .The description of
commentOnwas changed to specify it only takes a database ID (until #532 can be handled).Also a new test was added for creating child comments.
Does this close any currently open issues?
Invalidates #2195
Any other comments?
UserErrorfromCommentUpdate, sinceidis non-null and its exclusion will already throw a GraphQL error.Where has this been tested?
Operating System: Ubuntu 20.04 (Wsl2 + devilbox + PHP 8.0.15)
WordPress Version: 5.9.2