-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
Feedback on Relation Inputs Plugin #2273
Comments
This is dangerous; instead store a reference: const oldPlan = field.plan then overwrite the plan explicitly: field.plan = EXPORTABLE(...)
return field; |
This is dangerous; types/codecs/etc may appear in different orders, just picking the first and continuing can lead to an unstable schema. If there's a conflict, you should explicitly raise that fact (as an error). |
The main issue that I see is that this does not perform the mutations inside a transaction, so you can get partial success. The only way to achieve the transaction approach currently is to do all of the mutations in a single step (e.g. via |
Thanks for the feedback. This is interesting because I assumed that using the steps would let grafast optimize things. I had considered ejecting from the steps and handling in a single sql statement (basically what the v4 plugin does), but thought it would be preferable to do it through the grafast system. Back to the drawing board! |
In general, Grafast won't optimise steps that have sideEffects because it's hard to predict what impact those side effects might have. The payloads could be optimized, but the lack of transaction is the main concern here. |
That's fair. And makes sense. It seems like a shame to abandon (eject from?) grafast to accomplish these embedded mutations though. Lack of these embedded mutations has been a blocker for us, so I'm trying to get something together. |
If you use a true resolver the schema becomes impure and certain optimisations cannot be used; but there should be no need: pass the parent arg, fieldArgs, and context() into a sideEffect plan and you’ve got the majority of a resolver right there (all you’re missing is resolveInfo). |
Would love some feedback on efforts to port the nested-mutations-plugin form v4 to v5.
https://github.com/litewarp/graphile-relation-inputs-plugin
Thanks again for all your hard work.
The text was updated successfully, but these errors were encountered: