#enable queries by id ?
9 messages · Page 1 of 1 (latest)
Looks like you've added types already? What is the error?
m running queries in parallel r8 n its giving me array of response i destruture arrays with names - n its not giving me completion only first credits one giving but rest of the variables not giving
for now i put any m not able to find solution
I don't understand what you mean here, and these screenshots don't give enough context. If you can provide a sandbox that'll be best.
u can check here https://github.dev/FrontendFrenzy/ReelRiot under pages > movie [...slug].ts
So what was the issue with:
const [credits, images, videos, reviews] = useQueries({
queries: tmdbMovie.queries.map<UseQueryOptions<ICredits, Error>>((query) => ({
queryKey: [`${tMovie.id}/${query}`],
enabled: !!tMovie,
})),
});
I just tried it and it seems to work. credits, images, videos and reviews get the type UseQueryResult<ICredits, Error>.
its giving only credits type completion - <UseQueryOptions<ICredits, Error> in here m passing ICredit how to pass mutiple types ?
i tried doing this type MovieMetaResult = ICredit | Iimages | Ivideos | Ireviews
<UseQueryOptions<MovieMetaResult , Error> n pss like this but not giving completion
i just wanna know how to pass type correctly to each response https://github.com/TanStack/query/issues/1675 here they're mentioning but m new to typescript not able to understand