package types import ( "context" "git.aiterp.net/rpdata/api/services" "git.aiterp.net/rpdata/api/models" ) type tokenResolver struct { auth *services.AuthService } func (r *tokenResolver) User(ctx context.Context, token *models.Token) (*models.User, error) { return r.auth.FindUser(ctx, token.UserID) } // TokenResolver is a resolver func TokenResolver(s *services.Bundle) *tokenResolver { return &tokenResolver{auth: s.Auth} }