const fetchData = async (key, compId, tmId) => {
console.log('params: ', { key, compId, tmId });
let url = `/this-path/comp/${compId}/tm/${tmId}`;
const result = await axios.get(url);
return result.data;
};
const fetchOutput = useQuery(['string-key', 231, 1053039], fetchData);
In the example above, we need the fetchData() parameter compId to equal 231, and tmId to equal 1053039. Based on my understanding of react-query, I thought that I would get this. However, instead we get this:
...where the queryKey array is accessable at key.queryKey, however the params compId and tmId are undefined, even though we're using useQuery() as such: useQuery(['string-key', 231, 1053039], fetchData)...
Is there something we're missing here? How can we get these values to serve as parameters for the callback fetchData function?

