Adds support for nesting mutations by
- Updating the scaffolded input types to allow nested data.
- Augmenting the scaffolded resolvers to handle this extra data and delegate to the appropriate resolvers for each type
- SilverStripe CMS ^4.0
Define exactly which Scaffolded DataObjects allow nested mutations of their has_one and has_many relationships
SilverStripe\GraphQL\Controller:
schema:
scaffolding:
allowNestedMutations:
- <Namespace/DataObjectClassName>
Don't forget to allow update and/or create mutation operations on the scaffolders also. e.g.
SilverStripe\GraphQL\Manager:
schemas:
default: #default schema
scaffolding:
types:
CustomDataObject:
operations:
create: true
update: true
Currently this will only work for Update and Create Mutations. Both these scaffolders extend the MutationScaffolder
class which I hook into.