package queries import ( "context" "errors" "git.aiterp.net/rpdata/api/model/character" ) func (r *resolver) Character(ctx context.Context, id *string, nick *string) (character.Character, error) { if id != nil { return character.FindID(*id) } else if nick != nil { return character.FindNick(*nick) } else { return character.Character{}, errors.New("You must specify either an ID or a nick") } } func (r *resolver) Characters(ctx context.Context, filter *character.Filter) ([]character.Character, error) { return character.List(filter) }