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(svelte-query): specify StoreOrVal options in function signature #7453

Merged

Conversation

ap0nia
Copy link
Contributor

@ap0nia ap0nia commented May 18, 2024

Summary

Expose the CreateMutationOptions as a regular object, and wrap it with StoreOrVal in the createMutation function signature.

Reasoning

Aside from being inconvenient if I wanted to refer to the unwrapped mutation options object, it seems to be inconsistent with the other type definitions for query options? createQuery, createInfiniteQuery both have StoreOrVal wrapped around their options in their function signature, and the exposed type for options is just an object.

Copy link

nx-cloud bot commented May 18, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 58d005b. 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.

Copy link

codecov bot commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.74%. Comparing base (d2a92d9) to head (58d005b).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #7453       +/-   ##
===========================================
+ Coverage   44.46%   90.74%   +46.28%     
===========================================
  Files         185       18      -167     
  Lines        7049      162     -6887     
  Branches     1549       32     -1517     
===========================================
- Hits         3134      147     -2987     
+ Misses       3552       12     -3540     
+ Partials      363        3      -360     
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 ∅ <ø> (∅)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client ∅ <ø> (∅)
@tanstack/svelte-query 90.00% <ø> (ø)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <ø> (ø)
@tanstack/vue-query ∅ <ø> (∅)
@tanstack/vue-query-devtools ∅ <ø> (∅)

@TanStack TanStack deleted a comment from codesandbox-ci bot Jul 7, 2024
@TanStack TanStack deleted a comment from vercel bot Jul 7, 2024
@TanStack TanStack deleted a comment from stackblitz bot Jul 7, 2024
Copy link

pkg-pr-new bot commented Jul 7, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

commit: 58d005b

@tanstack/angular-query-devtools-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@7453

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@7453

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@7453

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@7453

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@7453

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@7453

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@7453

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@7453

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@7453

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@7453

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@7453

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@7453

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@7453

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@7453

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@7453

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@7453

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@7453

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@7453

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@7453

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@7453

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@7453


templates

Copy link
Member

@lachlancollins lachlancollins left a comment

Choose a reason for hiding this comment

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

Thanks @ap0nia !

@lachlancollins lachlancollins merged commit 2df92a6 into TanStack:main Jul 8, 2024
7 checks passed
This pull request was closed.
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.

2 participants