Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modules-sdk): remote query get loaded modules #4596

Merged
merged 6 commits into from
Jul 24, 2023
5 changes: 5 additions & 0 deletions .changeset/two-geese-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/modules-sdk": minor
---

Fix getting loaded modules
9 changes: 4 additions & 5 deletions packages/modules-sdk/src/remote-query.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { RemoteJoiner } from "@medusajs/orchestration"
import {
JoinerRelationship,
JoinerServiceConfig,
ModuleDefinition,
RemoteExpandProperty,
} from "@medusajs/types"
import { toPascalCase } from "@medusajs/utils"

import { MedusaModule } from "./medusa-module"
import { RemoteJoiner } from "@medusajs/orchestration"
import { toPascalCase } from "@medusajs/utils"

export class RemoteQuery {
private remoteJoiner: RemoteJoiner
Expand Down Expand Up @@ -34,9 +35,7 @@ export class RemoteQuery {
}

const servicesConfig: JoinerServiceConfig[] = []
for (const modService of modulesLoaded) {
const mod: any = Object.values(modService)[0]

for (const mod of modulesLoaded) {
if (!mod.__definition.isQueryable) {
continue
}
Expand Down