Skip to content
Source
Sign inSign up
TanStack/query

fix(solid-query): Default `reconcile` to false #6125

Mergedardeora(GitHub profile, opens in a new tab)merged 1 commit intorc fromrefs/pull/6125/headmerged by ardeora(GitHub profile, opens in a new tab) View on GitHub

Fixes #5738 Fixes #5994 Fixes #6102

There seems to be a bug in how reconcile works with previously reconciled objects. Potentially a solid-js issue. Either way, The reconcile option needs to be used carefully and is not suitable for most cases. So I am making this opt-in. It wasn't documented yet so it's safe to default it to false.

    1. The latest updates on your projects. Learn more about Vercel for Git ↗︎

      1 Ignored Deployment
      NameStatusPreviewCommentsUpdated (UTC)
      query⬜️ Ignored (Inspect)Visit PreviewOct 10, 2023 7:07pm
    2. ☁️ Nx Cloud Report

      CI is running/has finished running commands for commit 87aabae7bcaa4509cbf4718d13eebb78af33904b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

      📂 See all runs for this CI Pipeline Execution


      ✅ Successfully ran 1 target

    3. Sent with 💌 from NxCloud.

  • This pull request is automatically built and testable in CodeSandbox.

    To see build info of the built libraries, click here or the icon next to each commit SHA.

    Latest deployment of this branch, based on commit 87aabae7bcaa4509cbf4718d13eebb78af33904b:

    SandboxSource
    @tanstack/query-example-react-basic-typescriptConfiguration
    @tanstack/query-example-solid-basic-typescriptConfiguration
    @tanstack/query-example-svelte-basicConfiguration
    @tanstack/query-example-vue-basicConfiguration
  • Codecov Report

    All modified lines are covered by tests :white_check_mark:

    :exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

    FilesCoverage Δ
    packages/solid-query/src/QueryClient.ts100.00% <ø> (ø)
    packages/solid-query/src/createBaseQuery.ts69.23% <100.00%> (ø)

    ... and 67 files with indirect coverage changes

    :loudspeaker: Thoughts on this report? Let us know!.

  • Yeah, this bug hit us in mblajek/Memo twice at least. We have a TanStack Table populated from TanStack Query, with all of sorting, filtering, paging etc done on the backend. We observed various terrible bugs, like page 2 of results still showing data from page 1 (actually new data arrived, but the identity of query.data did not change), then we had bugs with filters being stuck, e.g. I set a filter, go to a different page (of the single page app), then back, the filter is then clear and everything is created anew, but I see filtered data. Why? Because the data in the cache for unfiltered and for filtered lists were somehow structurally not separate. The most "interesting" debugging session I've had in years. Figured out the reconcile finally, but yes, this is very broken right now.

    I was trying to report a bug, but it turns out I'm not able to prepare a small repro of the problems. I'm really glad someone else figured this out without my bug report :)

  • Yeah, this bug hit us in mblajek/Memo twice at least. We have a TanStack Table populated from TanStack Query, with all of sorting, filtering, paging etc done on the backend. We observed various terrible bugs, like page 2 of results still showing data from page 1 (actually new data arrived, but the identity of query.data did not change), then we had bugs with filters being stuck, e.g. I set a filter, go to a different page (of the single page app), then back, the filter is then clear and everything is created anew, but I see filtered data. Why? Because the data in the cache for unfiltered and for filtered lists were somehow structurally not separate. The most "interesting" debugging session I've had in years. Figured out the reconcile finally, but yes, this is very broken right now.

    I was trying to report a bug, but it turns out I'm not able to prepare a small repro of the problems. I'm really glad someone else figured this out without my bug report :)

    Thank you so much for the detailed feedback 😄 I would also like to encourage you to open any issues/discussions when you run into any challenges with Solid Query. This package (solid-query) is less mature than React query, so there might be some rough edges that we would like to iron out. Feedback like this really helps us to improve this library!

  • Sign in to join this conversation.