Comments (3)
Start a new pull request in StackBlitz Codeflow.
from query.
I was originally looking to fix this by placing map operator before the shareReplay in base-query.ts
and mutation.ts
that essentially did this:
map(result => ({...result}))
However, I believe this creates a shallow copy and any computed calls evaluating the nested data would run into the same memoization problem. We would probably need a deep clone here to prevent this right? If so, I wanted to see what you or the other maintainers of this repo would like to use to do so. Typically I would pull in the cloneDeep function from lodash, but I don't want to add external libraries unless needed and OK with the repo maintainers. There is also the good ole'
JSON.parse(JSON.stringify(obj));
But this can cause issues with data loss when the data does not have a JSON representation, such as Dates.
If I am completely missing the mark here, please let me know. I am not so proud that I cannot admit I am a bit out of my wheelhouse when trying to understand this problem in the context of the entire library and how it works.
from query.
The response should be immutable. Closing the issue.
from query.
Related Issues (20)
- Cannot find module '@tanstack/query-core/build/legacy/queryClient-b7fce2ff' HOT 2
- Export MutationResult and CreateMutationOptions
- createSuccessObserverResult should also take a generic error HOT 3
- Add refetch to intersectResults HOT 6
- mutate function should subscribe to mutationObserver HOT 1
- Automatically unsubscribe query observable HOT 1
- Failure to deduplicate network requests HOT 12
- multiple fired network HOT 2
- onSuccess is never triggered when passed as option to mutate HOT 3
- Should ngneat/query Cache Pages Instead of Fetching on Each Pagination Click?
- support: angular v18 HOT 5
- bug: `throwOnError` does not work HOT 6
- ApplicationRef.isStable() is not emitting? HOT 6
- Detecting empty data in Angular/RxJS infinite scroll: Best approach? HOT 4
- Make it reactive (or is it already?) HOT 3
- Error: NG0203 at assertInInjectionContext HOT 2
- queryResultSignal() can only be used within an injection context? HOT 2
- How Can I Execute Logic When Query Data is Retrieved from Cache Using `@ngneat/query`? HOT 1
- Current version of `@tanstack/query-devtools` not optimized for air-gapped usage or with a strict CSP
- Feature Request: Enhance `injectQuery` to Accept an Options Object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from query.