package resolver

// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen

import (
	"context"

	"github.com/cloudoperators/heureka/internal/api/graphql/graph"
	"github.com/cloudoperators/heureka/internal/api/graphql/graph/baseResolver"
	"github.com/cloudoperators/heureka/internal/api/graphql/graph/model"
)

// SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and Greenhouse contributors
// SPDX-License-Identifier: Apache-2.0

func (r *activityResolver) Services(ctx context.Context, obj *model.Activity, filter *model.ServiceFilter, first *int, after *string, orderBy []*model.ServiceOrderBy) (*model.ServiceConnection, error) {
	return baseResolver.ServiceBaseResolver(r.App, ctx, filter, first, after, orderBy, &model.NodeParent{
		Parent:     obj,
		ParentName: model.ActivityNodeName,
	})
}

func (r *activityResolver) Issues(ctx context.Context, obj *model.Activity, filter *model.IssueFilter, first *int, after *string, orderBy []*model.IssueOrderBy) (*model.IssueConnection, error) {
	return baseResolver.IssueBaseResolver(
		r.App,
		ctx,
		filter,
		first,
		after,
		orderBy,
		&model.NodeParent{
			Parent:     obj,
			ParentName: model.ActivityNodeName,
		})
}

func (r *activityResolver) Evidences(ctx context.Context, obj *model.Activity, filter *model.EvidenceFilter, first *int, after *string) (*model.EvidenceConnection, error) {
	return baseResolver.EvidenceBaseResolver(
		r.App,
		ctx,
		filter,
		first,
		after,
		&model.NodeParent{
			Parent:     obj,
			ParentName: model.ActivityNodeName,
		})
}

func (r *activityResolver) IssueMatchChanges(ctx context.Context, obj *model.Activity, filter *model.IssueMatchChangeFilter, first *int, after *string) (*model.IssueMatchChangeConnection, error) {
	return baseResolver.IssueMatchChangeBaseResolver(
		r.App,
		ctx,
		filter,
		first,
		after,
		&model.NodeParent{
			Parent:     obj,
			ParentName: model.ActivityNodeName,
		})
}

func (r *Resolver) Activity() graph.ActivityResolver { return &activityResolver{r} }

type activityResolver struct{ *Resolver }
