TanStackT
TanStack13mo ago
4 replies
military-pink

QueryOptions

I just upgraded to the latest version and now my query options don't build.
userInfo = (userId: Signal<string|null>) => {
    return () => queryOptions({
        queryKey: ['userInfo', userId()],
        queryFn: () => this.service.getUserInfo(userId()!),
        enabled: () => userId() !== null,
      });
  }

Doesn't work any more. Getting TS2527 The inferred type of 'userProfile' references an inaccessible 'unqiue symbol' type. A type annotation is necessary.

??????
Was this page helpful?