Skip to content

Commit

Permalink
Add subscription options to useFlowRun
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed May 25, 2023
1 parent e96516e commit cfca997
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compositions/useFlowRun.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useSubscriptionWithDependencies } from '@prefecthq/vue-compositions'
import { SubscriptionOptions, useSubscriptionWithDependencies } from '@prefecthq/vue-compositions'
import { computed, Ref, ref, watch } from 'vue'
import { useCan } from '@/compositions/useCan'
import { useWorkspaceApi } from '@/compositions/useWorkspaceApi'
Expand All @@ -8,7 +8,7 @@ import { UseEntitySubscription } from '@/types/useEntitySubscription'

export type UseFlowRun = UseEntitySubscription<WorkspaceFlowRunsApi['getFlowRun'], 'flowRun'>

export function useFlowRun(flowRunId: string | Ref<string | null | undefined>): UseFlowRun {
export function useFlowRun(flowRunId: string | Ref<string | null | undefined>, options?: SubscriptionOptions): UseFlowRun {
const api = useWorkspaceApi()
const can = useCan()
const id = ref(flowRunId)
Expand All @@ -25,7 +25,7 @@ export function useFlowRun(flowRunId: string | Ref<string | null | undefined>):
return [id.value]
})

const subscription = useSubscriptionWithDependencies(api.flowRuns.getFlowRun, parameters)
const subscription = useSubscriptionWithDependencies(api.flowRuns.getFlowRun, parameters, options)

const storage = useFlowRunStorage()

Expand Down

0 comments on commit cfca997

Please sign in to comment.