followRef

Function: followRef()

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

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

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

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.