Skip to main content
Version: v2 RC

abortSignal()

Set the AbortSignal for the fetch request.

const ac = new AbortController()
ac.abort()
const { data, error } = await supabase
.from('very_big_table')
.select()
.abortSignal(ac.signal)

Parameters

  • signalrequiredAbortSignal

    The AbortSignal to use for the fetch request

Examples

Aborting requests in-flight

You can use an AbortController to abort requests. Note that status and statusText don't mean anything for aborted requests as the request wasn't fulfilled.

const ac = new AbortController()
ac.abort()
const { data, error } = await supabase
.from('very_big_table')
.select()
.abortSignal(ac.signal)