GraphQL-Query
mutation {
createMovie(title:"Forrest Gump", released: 1994) {
title
released
}
}
Cypher params
{
"createMovieReleased" : 1994,
"createMovieTitle" : "Forrest Gump"
}
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
{
"updateMovieReleased" : 1995,
"updateMovie_id" : 1
}
Cypher
MATCH (updateMovie:Movie)
WHERE elementId(updateMovie) = $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
{
"mergeMovieReleased" : 1995,
"mergeMovie_id" : 1
}
Cypher
MATCH (mergeMovie:Movie)
WHERE elementId(mergeMovie) = $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
{
"updateMovieReleased" : null,
"updateMovie_id" : 1
}
Cypher
MATCH (updateMovie:Movie)
WHERE elementId(updateMovie) = $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