Skip to content

feat: allow global/db ids in mediaItem mutation ID inputs#2331

Merged
jasonbahl merged 3 commits intowp-graphql:developfrom
justlevine:feat/mediaItem-mutation-id-inputs
May 3, 2022
Merged

feat: allow global/db ids in mediaItem mutation ID inputs#2331
jasonbahl merged 3 commits intowp-graphql:developfrom
justlevine:feat/mediaItem-mutation-id-inputs

Conversation

@justlevine
Copy link
Copy Markdown
Collaborator

@justlevine justlevine commented Apr 5, 2022

What does this implement/fix? Explain your changes.

This PR enables users to supply either a database ID or a global ID to mediaItem mutation inputs of type ID. Part of #998 .

Does this close any currently open issues?

Any other comments?

The mutate_and_get_payload methods were also refactored to bail earlier on failure and to remove some code duplication.

Where has this been tested?

Operating System: Ubuntu 20.04 (wsl2 + devilbox + php8.0.15)

WordPress Version: 5.9.2

@justlevine justlevine added type: enhancement Improvements to existing functionality needs: reviewer response This needs the attention of a codeowner or maintainer component: mutations Relating to GraphQL Mutations scope: api Issues related to access functions, actions, and filters object type: media Relating to the MediaItem Type labels Apr 5, 2022
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit 1c76a0b and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.006%) to 79.278% when pulling 1c76a0b on justlevine:feat/mediaItem-mutation-id-inputs into 2ee200f on wp-graphql:develop.

@justlevine justlevine added the status: in review Awaiting review before merging or closing label Apr 25, 2022
@jasonbahl jasonbahl merged commit e08a518 into wp-graphql:develop May 3, 2022
@justlevine justlevine deleted the feat/mediaItem-mutation-id-inputs branch May 3, 2022 23:51
@jasonbahl jasonbahl mentioned this pull request May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: mutations Relating to GraphQL Mutations needs: reviewer response This needs the attention of a codeowner or maintainer object type: media Relating to the MediaItem Type scope: api Issues related to access functions, actions, and filters status: in review Awaiting review before merging or closing type: enhancement Improvements to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants