MissingQueryFunctionError class final

Thrown when a query is fetched with no query function anywhere in its options chain.

Never retried, whatever the retry policy says: the fetch settles in error after its one attempt, so the message is seen at once rather than after the full backoff.

Typical causes: a QueryClient.query whose options have no queryFn and whose key has no default one, or a refetch of a key that only ever had data written with setQueryData while no observer supplies a function. Give the options a queryFn, or register one for the key with QueryClient.setQueryDefaults.

Implemented types

Constructors

MissingQueryFunctionError(QueryKey queryKey)
Creates the error for queryKey.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
queryKey → QueryKey
The key of the query that had no function to run.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited