fix(orchestration,link-modules,pricing,types): fix shippingprofile errror outside of core + change link alias name (#5025)
* fix(orchestration,link-modules,pricing,types): fix shippingprofile error outside of core + change link alias name * chore: scope relationships and move condition inside * chore: remove islist * chore: fix merge conflict * chore: reverted serviceName scoping * chore: change shape to make methodOverride compatible * chore: added methodOverride to remote query * chore: revert override
This commit is contained in:
@@ -197,6 +197,16 @@ 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`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user