entropyE
Convex Community14mo ago
8 replies
entropy

useQuery different return types

Hello, I'm fetching data with useQuery and for some reason it has two different return types. In one component it returns an object with the data, error, etc properties while in the other it only returns the data.

returns entry type | null | undefined
const entry = useQuery(api.functions.anime_entries.authSingleById, {
   id: media._id
 })


returns an object with data about the query as well
const { data: lists, error: listError } = useQuery(
  api.functions.lists.authAll,
  {}
)
Was this page helpful?