( injectQueryFn: () => CreateQueryOptions, options?: InjectQueryOptions, )
| 216 | * @see https://tanstack.com/query/latest/docs/framework/angular/guides/queries |
| 217 | */ |
| 218 | export function injectQuery( |
| 219 | injectQueryFn: () => CreateQueryOptions, |
| 220 | options?: InjectQueryOptions, |
| 221 | ) { |
| 222 | !options?.injector && assertInInjectionContext(injectQuery) |
| 223 | return runInInjectionContext(options?.injector ?? inject(Injector), () => |
| 224 | createBaseQuery(injectQueryFn, QueryObserver), |
| 225 | ) as unknown as CreateQueryResult |
| 226 | } |
searching dependent graphs…