package types import ( "context" "git.aiterp.net/rpdata/api/graph2/input" "git.aiterp.net/rpdata/api/models" ) type changeResolver struct{} func (r *changeResolver) Objects(ctx context.Context, obj *models.Change) ([]input.ChangeObject, error) { objects := obj.Objects() results := make([]input.ChangeObject, 0, len(objects)) for _, object := range objects { if changeObject, ok := object.(input.ChangeObject); ok { results = append(results, changeObject) } } return results, nil } // ChangeResolver is a resolver var ChangeResolver changeResolver