Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(solid-query): separate queryOptions from createQuery file #7806

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

lachlancollins
Copy link
Member

@lachlancollins lachlancollins commented Jul 27, 2024

  • The other framework adapters have the queryOptions function separate to the useQuery/createQuery function
  • This is an internal refactor to separate queryOptions (and infiniteQueryOptions) into its own file
  • This makes it easier to ensure that logic/types are kept consistent between adapters (e.g. it doesn't have the DefinedInitialDataOptions fix from fix(types): initialData function that returns undefined should still discriminate after isSuccess check #5869)
  • Also makes it easier to directly compare svelte-query to solid-query (API is becoming a lot more similar with svelte runes!)

Copy link

nx-cloud bot commented Jul 27, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b4c5a4f. 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 2 targets

Sent with 💌 from NxCloud.

@lachlancollins lachlancollins changed the title refactor(solid-query): separate queryOptions from createQuery refactor(solid-query): separate queryOptions from createQuery file Jul 27, 2024
Copy link

pkg-pr-new bot commented Jul 27, 2024

commit: b4c5a4f

pnpm add https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@7806
pnpm add https://pkg.pr.new/@tanstack/angular-query-experimental@7806
pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-query@7806
pnpm add https://pkg.pr.new/@tanstack/query-async-storage-persister@7806
pnpm add https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@7806
pnpm add https://pkg.pr.new/@tanstack/query-core@7806
pnpm add https://pkg.pr.new/@tanstack/query-devtools@7806
pnpm add https://pkg.pr.new/@tanstack/query-persist-client-core@7806
pnpm add https://pkg.pr.new/@tanstack/query-sync-storage-persister@7806
pnpm add https://pkg.pr.new/@tanstack/react-query@7806
pnpm add https://pkg.pr.new/@tanstack/react-query-devtools@7806
pnpm add https://pkg.pr.new/@tanstack/react-query-next-experimental@7806
pnpm add https://pkg.pr.new/@tanstack/react-query-persist-client@7806
pnpm add https://pkg.pr.new/@tanstack/solid-query@7806
pnpm add https://pkg.pr.new/@tanstack/solid-query-devtools@7806
pnpm add https://pkg.pr.new/@tanstack/solid-query-persist-client@7806
pnpm add https://pkg.pr.new/@tanstack/svelte-query@7806
pnpm add https://pkg.pr.new/@tanstack/svelte-query-devtools@7806
pnpm add https://pkg.pr.new/@tanstack/svelte-query-persist-client@7806
pnpm add https://pkg.pr.new/@tanstack/vue-query@7806
pnpm add https://pkg.pr.new/@tanstack/vue-query-devtools@7806

Open in Stackblitz

More templates

Copy link

codecov bot commented Jul 27, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.45%. Comparing base (c7245c9) to head (b4c5a4f).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #7806       +/-   ##
===========================================
+ Coverage   44.61%   79.45%   +34.83%     
===========================================
  Files         185       15      -170     
  Lines        7087      331     -6756     
  Branches     1574       63     -1511     
===========================================
- Hits         3162      263     -2899     
+ Misses       3562       56     -3506     
+ Partials      363       12      -351     
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental ∅ <ø> (∅)
@tanstack/eslint-plugin-query ∅ <ø> (∅)
@tanstack/query-async-storage-persister ∅ <ø> (∅)
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods ∅ <ø> (∅)
@tanstack/query-core ∅ <ø> (∅)
@tanstack/query-devtools ∅ <ø> (∅)
@tanstack/query-persist-client-core ∅ <ø> (∅)
@tanstack/query-sync-storage-persister ∅ <ø> (∅)
@tanstack/react-query ∅ <ø> (∅)
@tanstack/react-query-devtools ∅ <ø> (∅)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client ∅ <ø> (∅)
@tanstack/solid-query 78.20% <50.00%> (ø)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query ∅ <ø> (∅)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client ∅ <ø> (∅)
@tanstack/vue-query ∅ <ø> (∅)
@tanstack/vue-query-devtools ∅ <ø> (∅)

Copy link
Contributor

@ardeora ardeora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good @lachlancollins! Thanks for making the changes. Feel free to merge this in.

@TkDodo TkDodo merged commit 1dcd532 into main Aug 1, 2024
8 checks passed
@TkDodo TkDodo deleted the refactor-query-options branch August 1, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants