-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Populating nested mutations with other relationships for @update #549
Populating nested mutations with other relationships for @update #549
Conversation
Hey, can you please check the changes that are up and coming in #518 ? Would be nice if you can base your WIP on that, since otherwise it will require another rework afterwards. Thanks |
@spawnia it look like a huge PR, can you point to exactly what you mean? Do you mean the return types? |
Take a look at the MutationExecutor and the relevant tests for it. |
Hey, i noticed i did not have the changes that i referred to pushed. Sorry for the confusion, you can take a look now. |
Ok, so basically the style |
@liepaja can you give me a quick update on your progress with this? A use-case has popped up in our project that requires nested BelongsToMany updates. |
@spawnia sorry for late reply. I became quite busy recently. I plan to finish this PR by next weekends. |
# Conflicts: # tests/Integration/Schema/Directives/Fields/UpdateDirectiveTests/CoreTest.php
As this has pretty high priority for us, i started working on your branch. Just merged in master, will start adding tests and implementations soon. |
Hello, thank you for the great work. How is it going? |
Ok, i am back on track, will try to finish it today. |
Core functionalities are added, will add tests and it can be merged |
that's really exciting to read, thanks! |
頑張れー |
@JoeSchr lets leave it for another pull request, i'll try to make tests today or tomorrow so this could be finally pushed. |
@liepaja great progress on this, keep it up :) |
Hi @liepaja, great work so far, but I actually think that at least |
Just a quick headsup @liepaja we are probably finishing this up |
@liepaja @chrissm79 this should be ready, can you give it a quick review? |
Hey guys, sorry that couldn't properly finish PR. Got a tone of projects started, even a new youtube series :D. |
@JoeSchr there is nothing in Lighthouse right now that allows saving data to a pivot table directly through a nested BelongsToMany mutation. You can treat your If you want two allow changing pivot data as part of nested mutations, feel free to open up a new feature proposal/ PR. I am open for working that in, but the details for how the API might look are unclear to me. |
@spawnia Thanks, I worked some more on this and I think I'm almost there... I had two problems, one I fixed, but in a hacky way ($accessor which has the name of the pivot property, is protected) and the other (how to save the pivot property with the model relation we already have) I'm still working on. |
are there any guide(-lines) for creating a PR? I have never done it before... |
ok, I got it working, I will try to make a PR tomorrow |
@JoeSchr https://github.com/nuwave/lighthouse/blob/master/.github/CONTRIBUTING.md It is fine if you provide a WIP at first if the API is not fixed yet, but before merging anything we require tests and docs. |
Thanks, once I started looking for it, it was pretty easy to find and
follow ;)
…On Wed, Mar 27, 2019 at 9:15 PM Benedikt Franke ***@***.***> wrote:
@JoeSchr <https://github.com/JoeSchr>
https://github.com/nuwave/lighthouse/blob/master/.github/CONTRIBUTING.md
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#549 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH1pHnE9Gukng7S0OvinNflsI1OUuJUoks5va9FUgaJpZM4Zw2Lb>
.
|
done: #692 |
Related Issue
Resolves #396
Resolves #583
Resolves #586
Related to #332
Changes
Adding other relationship capabilities to nested mutations when using
@update
.| T indicates presence of a test
------------------------------- One to one/many
BelongsTo
create T
update T
delete T
connect T
disconnect T
HasOne
create T
update T
delete T
HasMany
create T
update T
delete T
------------------------------- Many to many
------------------------------- Morph one to one/many
MorphOne
create T
update T
delete T
connect
MorphMany
create T
update T
delete T
connect
MorphTo
no args