chore: Register Query in container (#9103)
* chore(framework): Register the query * chore(framework): Register the query
This commit is contained in:
@@ -353,9 +353,11 @@ async function MedusaApp_({
|
||||
)
|
||||
|
||||
if (loaderOnly) {
|
||||
async function query(...args: Parameters<RemoteQueryFunction>) {
|
||||
async function query(...args: any[]) {
|
||||
throw new Error("Querying not allowed in loaderOnly mode")
|
||||
}
|
||||
query.graph = query
|
||||
query.gql = query
|
||||
|
||||
return {
|
||||
onApplicationShutdown,
|
||||
@@ -363,7 +365,7 @@ async function MedusaApp_({
|
||||
onApplicationStart,
|
||||
modules: allModules,
|
||||
link: undefined,
|
||||
query: query as RemoteQueryFunction,
|
||||
query: query as unknown as RemoteQueryFunction,
|
||||
runMigrations: async () => {
|
||||
throw new Error("Migrations not allowed in loaderOnly mode")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user