Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only allow deletion of related models in nested mutations #2454

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

lucaslenz
Copy link
Contributor

@lucaslenz lucaslenz commented Oct 5, 2023

Resolves #2455

  • Added or updated tests
  • Documented user facing changes
  • Updated CHANGELOG.md

Changes

Add failing test cases for a bug concerning the delete field in nested mutations. Documentation says: delete the related model and the association to it (link).
These failing test cases show that actually any object can be deleted no matter of the relationship status to the root object.
This should not be possible!

Breaking changes

I am not aware of any breaking changes.

@lucaslenz lucaslenz changed the title Add failing test cases Only allow deletion of related models in nested mutations Oct 5, 2023
@spawnia
Copy link
Collaborator

spawnia commented Oct 6, 2023

Please resolve conflicts.

@spawnia spawnia marked this pull request as draft October 6, 2023 13:02
@spawnia spawnia added the bug An error within Lighthouse label Oct 6, 2023
@spawnia
Copy link
Collaborator

spawnia commented Oct 6, 2023

Again, your branch is out of date. You need to add this repository as a remote to your project and merge/rebase against the latest master.

lucaslenz and others added 6 commits October 6, 2023 15:19
…/lighthouse into nestdMutationDeleteBug

# Conflicts:
#	tests/Integration/Execution/MutationExecutor/BelongsToManyTest.php
#	tests/Integration/Execution/MutationExecutor/HasManyTest.php
#	tests/Integration/Execution/MutationExecutor/MorphManyTest.php
@lucaslenz lucaslenz marked this pull request as ready for review October 6, 2023 13:50
@spawnia
Copy link
Collaborator

spawnia commented Oct 12, 2023

The merge was totally messed up, I just fixed it.

@spawnia spawnia marked this pull request as draft October 28, 2023 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error within Lighthouse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only allow deletion of related models in nested mutations
2 participants