fix(workflows-sdk): use loaded modules when container is empty (#7422)

This commit is contained in:
Carlos R. L. Rodrigues
2024-05-23 08:26:16 -03:00
committed by GitHub
parent 05077bab32
commit f3d19f5394
13 changed files with 15 additions and 154 deletions

View File

@@ -244,18 +244,6 @@ export class RemoteJoiner {
{ fieldAlias, relationships },
] of expandedRelationships) {
if (!this.serviceConfigCache.has(serviceName)) {
// If true, the relationship is an internal service from the medusa core
// If modules are being used ouside of the core, we should not be throwing
// errors when the core services are not found in cache.
// TODO: Remove when there are no more "internal" services
const isInternalServicePresent = relationships.some(
(rel) => rel.isInternalService === true
)
if (isInternalServicePresent) {
continue
}
throw new Error(`Service "${serviceName}" was not found`)
}