TanStack

T

TanStack

TanStack is a community of passionate software engineers striving for high-quality, open-source software for web devs

Join

react-query-questions

solid-query-questions

table-questions

virtual-questions

router-questions

react-charts-questions

ranger-questions

vue-query-questions

svelte-query-questions

bling-questions

form-questions

angular-query-questions

start-questions

db-questions

start-showcase

router-showcase

📣-announcements

rival-black
rival-black7/24/2024

Provide angular query in spec file

When I provideQueryClient(() => new QueryClient()) in a spec file for jest testa I get random errors that say cannot read properties of undefined reading...
fascinating-indigo
fascinating-indigo7/5/2024

analog.js compat

Will angular query works in analog js?
fascinating-indigo
fascinating-indigo7/5/2024

Estimate release date

What could be the release date for the Angular Query?
fascinating-indigo
fascinating-indigo7/5/2024

Example of using data from the cache

Are there any links that we can check to see how to implement reusinh data from the cache?
fascinating-indigo
fascinating-indigo7/5/2024

Axios vs HttpClientModule

What's your take in using axios for angular query instead of httpclient of angular?
fascinating-indigo
fascinating-indigo7/5/2024

Primetime readiness

Can we use the angular query in production now?
correct-apricot
correct-apricot5/30/2024

What about removing the experimental flag ? Who is using it unsuccessfully ?

Well, I am using it, it works great, I enjoy it. But my company...
optimistic-gold
optimistic-gold5/10/2024

Reuse queryOptions, with signal based parameters

TLDR; when i change the $filterName, it does not update the query, when i use queryOptions. I have a query, that takes 3 arguments as its queryKey: name,pageIndex,pageSize. As per the docs, i created a function inside a service, that returns a queryOptions function. I think however, the issue here is that the keys initial values are comming from the signal. But further value changes are not propegated to the key, making it so, they queryKey never changes (and no refetching happens)...
metropolitan-bronze
metropolitan-bronze4/26/2024

Question about injection context

When I started, I had the impression that everything inside injectQuery (the main callback for the function, and any other functions like queryFn) is guaranteed to be called in injection context, but I now noticed that this might not be the case. If I understood correctly - the first time the callback is called (on "initialization") it IS in an injection context, but if one of the dependent signal changes and triggers a rerun of the method, this will not work anymore, causing exceptions. that are quite hard to debug, if you used inject somewhere inside it. I wonder if it might be a better implementation to inject(Injector) for when injectQuery is called, and use that injector with runInInjectionContext so the developer could use inject inside these functions. ...
metropolitan-bronze
metropolitan-bronze4/19/2024

What does "query mount" means on Angular?

I know what "mount" means in react, but I'm not sure what does that term mean in Angular. It's mentioned a couple of times in the docs.
metropolitan-bronze
metropolitan-bronze4/19/2024

Using observables as a return value for queryFn

The docs (https://tanstack.com/query/latest/docs/framework/angular/guides/queries) say "A function that returns a promise or observable ..." However, it seems like it's only possible to return a promise, if you return an Observable, the query is interpreted to resolve an observable (synchronously). Is that a mistake in the docs? Is that something that is planned on being supported in the future? ...
modern-teal
modern-teal1/26/2024

How to use signals as query keys and react to changes?

Hi everyone, I'm trying to get a reactive query using signals. This is my setup: For example, I have a signal that represents the id of the selected todo. I want to use this signal as the query key for my query. The problem is that when the signal key changes, the query remains the same. It doesn't react to the signal change. This code is taken from the docs (https://tanstack.com/query/v5/docs/framework/angular/guides/query-keys), but it doesn't work:...
fascinating-indigo
fascinating-indigo1/11/2024

How to persist data to IndexedDB ?

Hi, I was using this utility function to persist data to IndexedDB https://github.com/TanStack/query/discussions/1638 But after updating Angular Query from 5.16.1 to 5.17.9, this no longer works, With the latest version the cached data never appears but there is no loading either, when trying to refresh I see a glimpse of the data that should have been there before the refresh completes ...
fascinating-indigo
fascinating-indigo1/9/2024

I want to load a query's data inside an async function

Hi all, I have a feature in my app where the user can print out a report, now inside the async function to print the report I want to access a query's data but I'm not sure how to do that, I have created a helper function which works but I'm not sure if this is a good way to do it ```ts const loadQuery = <T, E>( queryFactory: () => CreateQueryResult<T, E>,...