11# Create a movie based on user input
2- mutation createMovie (
2+ mutation CreateMovie (
33 $title : String !
44 $releaseYear : Int !
55 $genre : String !
@@ -22,7 +22,7 @@ mutation createMovie(
2222}
2323
2424# Update movie information based on the provided ID
25- mutation updateMovie (
25+ mutation UpdateMovie (
2626 $id : UUID !
2727 $title : String
2828 $releaseYear : Int
@@ -47,37 +47,37 @@ mutation updateMovie(
4747}
4848
4949# Delete a movie by its ID
50- mutation deleteMovie ($id : UUID ! ) @auth (level : USER_EMAIL_VERIFIED ) {
50+ mutation DeleteMovie ($id : UUID ! ) @auth (level : USER_EMAIL_VERIFIED ) {
5151 movie_delete (id : $id )
5252}
5353
5454# Delete movies with a rating lower than the specified minimum rating
55- mutation deleteUnpopularMovies ($minRating : Float ! ) @auth (level : USER_EMAIL_VERIFIED ) {
55+ mutation DeleteUnpopularMovies ($minRating : Float ! ) @auth (level : USER_EMAIL_VERIFIED ) {
5656 movie_deleteMany (where : { rating : { le : $minRating } })
5757}
5858
5959# Add a movie to the user's favorites list
60- mutation addFavoritedMovie ($movieId : UUID ! ) @auth (level : USER ) {
60+ mutation AddFavoritedMovie ($movieId : UUID ! ) @auth (level : USER ) {
6161 favorite_movie_upsert (data : { userId_expr : " auth.uid" , movieId : $movieId })
6262}
6363
6464# Remove a movie from the user's favorites list
65- mutation deleteFavoritedMovie ($movieId : UUID ! ) @auth (level : USER ) {
65+ mutation DeleteFavoritedMovie ($movieId : UUID ! ) @auth (level : USER ) {
6666 favorite_movie_delete (key : { userId_expr : " auth.uid" , movieId : $movieId })
6767}
6868
6969# Add an actor to the user's favorites list
70- mutation addFavoritedActor ($actorId : UUID ! ) @auth (level : USER ) {
70+ mutation AddFavoritedActor ($actorId : UUID ! ) @auth (level : USER ) {
7171 favorite_actor_upsert (data : { userId_expr : " auth.uid" , actorId : $actorId })
7272}
7373
7474# Remove an actor from the user's favorites list
75- mutation deleteFavoriteActor ($actorId : UUID ! ) @auth (level : USER ) {
75+ mutation DeleteFavoritedActor ($actorId : UUID ! ) @auth (level : USER ) {
7676 favorite_actor_delete (key : { userId_expr : " auth.uid" , actorId : $actorId })
7777}
7878
7979# Add a review for a movie
80- mutation addReview (
80+ mutation AddReview (
8181 $movieId : UUID !
8282 $rating : Int !
8383 $reviewText : String !
@@ -94,14 +94,14 @@ mutation addReview(
9494}
9595
9696# Delete a user's review for a movie
97- mutation deleteReview (
97+ mutation DeleteReview (
9898 $movieId : UUID !
9999) @auth (level : USER ) {
100100 review_delete (key : { userId_expr : " auth.uid" , movieId : $movieId })
101101}
102102
103103# Upsert (update or insert) a user based on their username
104- mutation upsertUser ($username : String ! ) @auth (level : USER ) {
104+ mutation UpsertUser ($username : String ! ) @auth (level : USER ) {
105105 user_upsert (
106106 data : {
107107 id_expr : " auth.uid"
0 commit comments