in pkg/graphql/utils/parser.go [27:49]
func ParseScope(entity *api.Entity) *api.Scope {
scope := api.ScopeAll
if *entity.DestProcessName != "" {
scope = api.ScopeProcessRelation
} else if *entity.DestEndpointName != "" {
scope = api.ScopeEndpointRelation
} else if *entity.DestServiceInstanceName != "" {
scope = api.ScopeServiceInstanceRelation
} else if *entity.DestServiceName != "" {
scope = api.ScopeServiceRelation
} else if *entity.EndpointName != "" {
scope = api.ScopeEndpoint
} else if *entity.ProcessName != "" {
scope = api.ScopeProcess
} else if *entity.ServiceInstanceName != "" {
scope = api.ScopeServiceInstance
} else if *entity.ServiceName != "" {
scope = api.ScopeService
}
return &scope
}