Skip to content

Commit

Permalink
Merge pull request #1452 from PrefectHQ/add-subscription-options-to-u…
Browse files Browse the repository at this point in the history
…seflowrun

Enhancement: Add subscription options to `useFlowRun`
  • Loading branch information
pleek91 authored May 26, 2023
2 parents 310eec7 + cfca997 commit 5ebb049
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 5ebb049

Please sign in to comment.