v5 codemod does not work with query key variables outside the file

The remove-overloads codemod isn't working for all of my queries, which look like this:

return useQuery(queryKeys.globalApy, handleFetchApy)


queryKeys is a variable from another file, and the value of queryKeys.globalApy is ['global-apy']

As soon as I replace the variable with its inline value:

return useQuery(['global-apy'], handleFetchApy)


It suddenly works for said file. Is there anything I may be doing wrong? Is this probably from my ts config?
Was this page helpful?