query icon indicating copy to clipboard operation
query copied to clipboard

Solid: Cannot access 'refetch' before initialization

Open egoist opened this issue 1 year ago • 2 comments

Describe the bug

When deferStream is false, the withError example here will be broken: https://stackblitz.com/edit/tanstack-query-aqydpb?file=src%2Froutes%2Fwith-error.tsx (forked from official solid start example)

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-query-aqydpb?file=src%2Froutes%2Fwith-error.tsx

Steps to reproduce

just remove deferStream or set it to false in the with-error example

Expected behavior

should show the actual error, instead of Cannot access 'refetch' before initialization

How often does this bug happen?

Often

Screenshots or Videos

CleanShot 2024-04-19 at 20 11 46@2x

Platform

Not relevant

Tanstack Query adapter

solid-query

TanStack Query version

5.30.6

TypeScript version

No response

Additional context

No response

### Tasks

egoist avatar Apr 19 '24 12:04 egoist

I'm getting this same error regardless of how I set deferStream.

laptou avatar May 31 '24 06:05 laptou

@ardeora FYI

TkDodo avatar Aug 01 '24 13:08 TkDodo