solid-trpc
solid-trpc copied to clipboard
query.ts:359 As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']
Hi,
I am trying to use this in my solid-js application, I am getting the following exception while calling my hook for getting the data
query.ts:359 As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']
and My function is const res = trpc.terms.getTerms.useQuery();
Hi,
I am trying to use this in my solid-js application, I am getting the following exception while calling my hook for getting the data
query.ts:359 As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']
and My function is
const res = trpc.terms.getTerms.useQuery();
Can you make a full repro? Not sure exactly what is going on
@avjabalpur I had the same issue when I was using the code from the README in the next
branch, but I was able to resolve it by upgrading: "@tanstack/solid-query": "^4.33.0",
--> "@tanstack/solid-query": "^5.0.0-beta.15",
. It seems like the installation instructions from the README installs @tanstack/solid-query: v4.33.0
(as of writing this), but the beta version is required -- in fact, Create JD App produces a package.json
with the beta version installed and works fine.
I hope that helps