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:
Riqwan Thamir
2023-09-13 12:16:00 +02:00
committed by GitHub
parent 7231f65833
commit 3d68be2b6b
10 changed files with 49 additions and 21 deletions

View File

@@ -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`)
}