How to create mutation to create relations using makeAugmentedSchema


I could create all queries and mutations to query/create/update/delete nodes using makeAugmentedSchema

Can you please help to share your knowledge and some samples how mutations can be created using makeAugmentedSchema( with out using makeExecuteableSchema and resolvers).

Thanks in advance!

I do quite a few of my mutations, especially group mutations with custom Cypher queries such as:

cloneLeaseClauses(leaseID: ID!, clauses: [ID]!): Lease
"MATCH (l:Lease {id: $leaseID})
WITH l as lease UNWIND $clauses as info
MATCH (n:Clause {id: info}) call apoc.refactor.cloneNodes([n], false, ['id'])
yield output set = randomUUID() 
MERGE (lease)-[:CLAUSE]->(output) return lease"

This allows you to get custom behavior from cypher as well as custom return types. I hope that helps.