jsonnull/electron-trpc

Query never resolves when the input is undefined

Closed this issue · 2 comments

I'm consulting a query that does not have parameters this way:

trpc.endpoint.useQuery(undefined);

And it is never responding.

My current workaround is to send an empty object like this:

trpc.endpoint.useQuery({});

Is the server expecting a value? Can you just not send it?

I realized that it was my mistake. The query was being sent before the IPC was attached on the main process.