abortSignal()

Set the AbortSignal for the fetch request.

1const ac = new AbortController()
2ac.abort()
3const { data, error } = await supabase
4  .from('very_big_table')
5  .select()
6  .abortSignal(ac.signal)

Parameters#

  • signalrequired
    AbortSignal

    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.

1const ac = new AbortController()
2ac.abort()
3const { data, error } = await supabase
4  .from('very_big_table')
5  .select()
6  .abortSignal(ac.signal)