func marshalScrapedMovies(content []models.ScrapedContent) ([]*models.ScrapedMovie, error) {
	var ret []*models.ScrapedMovie
	for _, c := range content {
		if c == nil {
			// graphql schema requires movies to be non-nil
			continue
		}

		switch m := c.(type) {
		case *models.ScrapedMovie:
			ret = append(ret, m)
		case models.ScrapedMovie:
			ret = append(ret, &m)
		default:
			return nil, fmt.Errorf("%w: cannot turn ScrapedConetnt into ScrapedMovie", models.ErrConversion)
		}
	}

	return ret, nil
}
// marshalScrapedMovies converts ScrapedContent into ScrapedMovie. If conversion
// fails, an error is returned.
marshalScrapedMovies converts ScrapedContent into ScrapedMovie. If conversion
fails, an error is returned.
// marshalScrapedMovies converts ScrapedContent into ScrapedMovie . If conversion // fails an error is returned .
func marshalScrapedMovies(content []models.ScrapedContent) ([]*models.ScrapedMovie, error) {
	var ret []*models.ScrapedMovie
	for _, c := range content {
		if c == nil {
			continue
		}
		switch m := c.(type) {
		case *models.ScrapedMovie:
			ret = append(ret, m)
		case models.ScrapedMovie:
			ret = append(ret, &m)
		default:
			return nil, fmt.Errorf("%w: cannot turn ScrapedConetnt into ScrapedMovie", models.ErrConversion)
		}
	}
	return ret, nil
}
func marshalScrapedMovies ( content [ ] models . ScrapedContent ) ( [ ] * models . ScrapedMovie , error ) { var ret [ ] * models . ScrapedMovie for _ , c := range content { if c == nil { continue } switch m := c . ( type ) { case * models . ScrapedMovie : ret = append ( ret , m ) case models . ScrapedMovie : ret = append ( ret , & m ) default : return nil , fmt . Errorf ( " " , models . ErrConversion ) } } return ret , nil }
marshalScrapedMovies converts ScrapedContent into ScrapedMovie.
marshalScrapedMovies converts ScrapedContent into ScrapedMovie .
// graphql schema requires movies to be non-nil