The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > / > namedQuery

namedQuery() function

Reads a Firestore Query from local cache, identified by the given name.

The named queries are packaged into bundles on the server side (along with resulting documents), and loaded to local cache using loadBundle. Once in local cache, use this method to extract a Query by name.

Signature:

export declare function namedQuery(firestore: FirebaseFirestore, name: string): Promise<Query | null>;

Parameters

Parameter Type Description
firestore FirebaseFirestore
name string

Returns:

Promise<Query | null>