fix(core-flows): useQueryGraph util return type (#12962)

This commit is contained in:
Adrien de Peretti
2025-07-16 00:34:23 +02:00
committed by GitHub
parent 1ba316a26e
commit 2c2528a087
2 changed files with 14 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/core-flows": patch
---
fix(core-flows): useQueryGraph util return type

View File

@@ -7,9 +7,10 @@ import {
import { createStep, StepFunction, StepResponse } from "@medusajs/workflows-sdk"
import { ContainerRegistrationKeys } from "@medusajs/utils"
export type UseQueryGraphStepInput<TEntry extends string> = RemoteQueryInput<TEntry> & {
options?: RemoteJoinerOptions
}
export type UseQueryGraphStepInput<TEntry extends string> =
RemoteQueryInput<TEntry> & {
options?: RemoteJoinerOptions
}
const useQueryGraphStepId = "use-query-graph-step"
@@ -30,7 +31,7 @@ const step = createStep(
* This step fetches data across modules using the Query.
*
* Learn more in the [Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).
*
*
* @example
* To retrieve a list of records of a data model:
*
@@ -101,5 +102,7 @@ const step = createStep(
*/
export const useQueryGraphStep = <const TEntry extends string>(
input: UseQueryGraphStepInput<TEntry>
): ReturnType<StepFunction<UseQueryGraphStepInput<TEntry>, GraphResultSet<TEntry>>> =>
step(input as any) as unknown as ReturnType<StepFunction<UseQueryGraphStepInput<TEntry>, GraphResultSet<TEntry>>>
): ReturnType<StepFunction<any, GraphResultSet<TEntry>>> =>
step(input as any) as unknown as ReturnType<
StepFunction<any, GraphResultSet<TEntry>>
>