Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strong-wolves-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/core-flows": patch
---

fix(core-flows): useQueryGraph util return type
15 changes: 9 additions & 6 deletions packages/core/core-flows/src/common/steps/use-query-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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:
*
Expand Down Expand Up @@ -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>>
>