* ci: Add preview workflow
* Mark query-codemods as private
* Ignore query-codemods for CSB
* Test templates
* Fix templates glob
* Fix private fields
* Move --compact
* One of these will work
* One more attempt
* Adjust command
* Specific template
* Remove private...
* no-template
* docs(vue): up-to-date devtools information
need to help users clarify their current status
* Update devtools.md
* Update devtools.md
* Update devtools.md
* docs: restructure devtools page
---------
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
* Add possibility to pass a callback to enabled.
* Refactor into using the same pattern as resolving staletime, with the use of a resolveEnabled util function
* Update tests for enabled option as a callback
* update docs
* remove typo
* Update enabled type in docs
* remove duplicated test case
* Fix eslint errors
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: John Pettersson <john.pettersson@carnegie.se>
* feat: usePrefetchQuery
* refactor: switch to actual prefetching
* refactor: remove ensureInfiniteQueryData function
will do in a separate PR
* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery (#7586)
* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery
* chore: update tests to assert the alternative spy is not called
* chore: add some new tests
* chore: remove it.only whoops
* chore: call mockClear after fetching
* chore: improve waterfall test by asserting fallback calls instead of loading node query
* chore: improve code repetition
* chore: add some generics to helper functions
* usePrefetchQuery type tests and docs (#7592)
* chore: add type tests and docs
* chore: update hooks to use FetchQueryOptions and FetchInfiniteQueryOptions
* chore: update tests
* chore: update docs
* chore: remove .md extension from link
* chore: add unknown default value to TQueryFnData
* Apply suggestions from code review
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Apply suggestions from code review
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
* chore: fix types in tests
* chore: add new tests (#7614)
* chore: add new tests
* Apply suggestions from code review
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
---------
Co-authored-by: Bruno Lopes <88719327+brunolopesr@users.noreply.github.com>
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
* fix(angular-query-experimental): run mutation callback in injection context
Previously, the injectMutation callback was run in injection context only if accessed in the same task as the component initialization (i.e. before the `effect` callback run). By running the effect run in injection context, it is ensured that the callback will always run in injection context, and any `inject` calls will not fail.
Note there is a separate issue here, and it's that the callback is always run twice - once synchronously when initialization the mutation, and secondly as the first callback of the `effect`. This is something that can potentially be improved.
No breaking changes, any code that worked before should still work.
* run prettier
* Catch error in test
---------
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
allow the inline script to be executed when CSP is enforced by including nonce to the script
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>