GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
452 B

package resolvers
import (
"context"
"git.aiterp.net/rpdata/api/graph2/graphcore"
"git.aiterp.net/rpdata/api/models"
)
/// Queries
func (r *queryResolver) UnknownNicks(ctx context.Context, filter *graphcore.UnknownNicksFilter) ([]*models.UnknownNick, error) {
limit := 20
if filter != nil {
limit = filter.Limit
}
nicks := r.s.Logs.ListUnknownNicks()
if limit > 0 && len(nicks) > limit {
nicks = nicks[:limit]
}
return nicks, nil
}