Skip to content

Commit 2c2528a

Browse files
authored
fix(core-flows): useQueryGraph util return type (medusajs#12962)
1 parent 1ba316a commit 2c2528a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.changeset/strong-wolves-cry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/core-flows": patch
3+
---
4+
5+
fix(core-flows): useQueryGraph util return type

packages/core/core-flows/src/common/steps/use-query-graph.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import {
77
import { createStep, StepFunction, StepResponse } from "@medusajs/workflows-sdk"
88
import { ContainerRegistrationKeys } from "@medusajs/utils"
99

10-
export type UseQueryGraphStepInput<TEntry extends string> = RemoteQueryInput<TEntry> & {
11-
options?: RemoteJoinerOptions
12-
}
10+
export type UseQueryGraphStepInput<TEntry extends string> =
11+
RemoteQueryInput<TEntry> & {
12+
options?: RemoteJoinerOptions
13+
}
1314

1415
const useQueryGraphStepId = "use-query-graph-step"
1516

@@ -30,7 +31,7 @@ const step = createStep(
3031
* This step fetches data across modules using the Query.
3132
*
3233
* Learn more in the [Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).
33-
*
34+
*
3435
* @example
3536
* To retrieve a list of records of a data model:
3637
*
@@ -101,5 +102,7 @@ const step = createStep(
101102
*/
102103
export const useQueryGraphStep = <const TEntry extends string>(
103104
input: UseQueryGraphStepInput<TEntry>
104-
): ReturnType<StepFunction<UseQueryGraphStepInput<TEntry>, GraphResultSet<TEntry>>> =>
105-
step(input as any) as unknown as ReturnType<StepFunction<UseQueryGraphStepInput<TEntry>, GraphResultSet<TEntry>>>
105+
): ReturnType<StepFunction<any, GraphResultSet<TEntry>>> =>
106+
step(input as any) as unknown as ReturnType<
107+
StepFunction<any, GraphResultSet<TEntry>>
108+
>

0 commit comments

Comments
 (0)