Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-17-2019 02:24 AM
Dears,
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!
12-03-2019 08:33 AM
I do quite a few of my mutations, especially group mutations with custom Cypher queries such as:
cloneLeaseClauses(leaseID: ID!, clauses: [ID]!): Lease
@cypher(
statement:
"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 output.id = 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.
All the sessions of the conference are now available online