package api import ( "context" "github.com/stashapp/stash/models" "strconv" ) func (r *queryResolver) FindPerformer(ctx context.Context, id string) (*models.Performer, error) { qb := models.NewPerformerQueryBuilder() idInt, _ := strconv.Atoi(id) return qb.Find(idInt) } func (r *queryResolver) FindPerformers(ctx context.Context, performer_filter *models.PerformerFilterType, filter *models.FindFilterType) (models.FindPerformersResultType, error) { qb := models.NewPerformerQueryBuilder() performers, total := qb.Query(performer_filter, filter) return models.FindPerformersResultType{ Count: total, Performers: performers, }, nil } func (r *queryResolver) AllPerformers(ctx context.Context) ([]models.Performer, error) { qb := models.NewPerformerQueryBuilder() return qb.All() }