Is there a way to create extra resources when doing a single create?
For example: creating default relations when the parent object is created, without the client needing to pass in the nested mutation params
a
agartha
11/30/2017, 3:59 AM
You could do that in an
operationAfter
hook
m
Marc Qualie
11/30/2017, 4:01 AM
Would I then just chain mutations using graphql-lib? I’m curious how to handle errors in this case, as I’m assuming this won’t be within a transaction
Marc Qualie
11/30/2017, 4:01 AM
e.g The parent is created, but in the operationAfter the relation fails
a
agartha
11/30/2017, 4:05 AM
No that won't be in a transaction
agartha
11/30/2017, 4:06 AM
You could in theory delete the parent if one of the mutations in the after hook fails, like a kind of rollback