Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

followRef.md

47 lines807 Bytes

Function: followRef()

function followRef(
   query, 
   ref, 
   collection): 
  | void
  | {
  collection: Collection;
  path: string[];
};

Defined in: packages/db/src/query/ir.ts:234

Follows the given reference in a query until its finds the root field the reference points to.

Parameters

query

QueryIR

ref

PropRef<any>

collection

Collection

Returns

| void | { collection: Collection; path: string[]; }

The collection, its alias, and the path to the root field in this collection