package resolvers import ( "context" "git.aiterp.net/rpdata/api/graph2/graphcore" "git.aiterp.net/rpdata/api/models" "git.aiterp.net/rpdata/api/models/unknownnicks" ) /// Queries func (r *queryResolver) UnknownNicks(ctx context.Context, filter *graphcore.UnknownNicksFilter) ([]*models.UnknownNick, error) { limit := 100 if filter != nil { if filter.Limit > 0 { limit = filter.Limit } } nicks, err := unknownnicks.List(limit) if err != nil { return nil, err } nicks2 := make([]*models.UnknownNick, len(nicks)) for i := range nicks { nicks2[i] = &nicks[i] } return nicks2, nil }