query icon indicating copy to clipboard operation
query copied to clipboard

refactor(svelte-query): specify StoreOrVal options in function signature

Open ap0nia opened this issue 1 year ago • 5 comments

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.

ap0nia avatar May 18 '24 17:05 ap0nia

☁️ Nx Cloud Report

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

nx-cloud[bot] avatar May 18 '24 17:05 nx-cloud[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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 ∅ <ø> (∅)

codecov[bot] avatar May 18 '24 17:05 codecov[bot]

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

pkg-pr-new[bot] avatar Jul 07 '24 02:07 pkg-pr-new[bot]