diff --git a/pkg/api/resolver_mutation_movie.go b/pkg/api/resolver_mutation_movie.go index 75acf83f6..d52d0dabe 100644 --- a/pkg/api/resolver_mutation_movie.go +++ b/pkg/api/resolver_mutation_movie.go @@ -64,6 +64,11 @@ func (r *mutationResolver) MovieCreate(ctx context.Context, input models.MovieCr newMovie.Rating = sql.NullInt64{Int64: rating, Valid: true} } + if input.StudioID != nil { + studioID, _ := strconv.ParseInt(*input.StudioID, 10, 64) + newMovie.StudioID = sql.NullInt64{Int64: studioID, Valid: true} + } + if input.Director != nil { newMovie.Director = sql.NullString{String: *input.Director, Valid: true} }