GraphQL-Query
mutation {
createMovie(title:"Forrest Gump", released: 1994) {
title
released
}
}
Cypher params
{
"createMovieTitle": "Forrest Gump",
"createMovieReleased": 1994
}
Cypher
CREATE (createMovie:Movie { title: $createMovieTitle, released: $createMovieReleased })
WITH createMovie
RETURN createMovie { .title, .released } AS createMovie
GraphQL-Query
mutation {
updateMovie(_id: 1, released: 1995) {
title
released
}
}
Cypher params
{
"updateMovie_id": 1,
"updateMovieReleased": 1995
}
Cypher
MATCH (updateMovie: Movie)
WHERE ID(updateMovie) = toInteger($updateMovie_id)
SET updateMovie += { released: $updateMovieReleased }
WITH updateMovie
RETURN updateMovie { .title, .released } AS updateMovie
GraphQL-Query
mutation {
mergeMovie(_id: 1, released: 1995) {
title
released
}
}
Cypher params
{
"mergeMovie_id": 1,
"mergeMovieReleased": 1995
}
Cypher
MATCH (mergeMovie: Movie)
WHERE ID(mergeMovie) = toInteger($mergeMovie_id)
SET mergeMovie += { released: $mergeMovieReleased }
WITH mergeMovie
RETURN mergeMovie { .title, .released } AS mergeMovie
GraphQL-Query
mutation {
updateMovie(_id: 1, released: null) {
title
released
}
}
Cypher params
{
"updateMovie_id": 1,
"updateMovieReleased": null
}
Cypher
MATCH (updateMovie: Movie)
WHERE ID(updateMovie) = toInteger($updateMovie_id)
SET updateMovie += { released: $updateMovieReleased }
WITH updateMovie
RETURN updateMovie { .title, .released } AS updateMovie
GraphQL-Query
{
movie(released: 1994) {
title
released
}
}
Cypher params
{
"movieReleased": 1994
}
Cypher
MATCH (movie: Movie)
WHERE movie.released = $movieReleased
RETURN movie { .title, .released } AS movie