Package-level declarations

Types

Link copied to clipboard
external interface DataConnect : JsAny
Link copied to clipboard
external interface MutationRef : JsAny
Link copied to clipboard
external interface OperationResult : JsAny

The result of executeQuery/executeMutation: the data, and for a query "CACHE" or "SERVER".

Link copied to clipboard
external interface QueryRef : JsAny

Functions

Link copied to clipboard
external fun connectDataConnectEmulator(dc: DataConnect, host: String, port: Int, sslEnabled: Boolean)
Link copied to clipboard
external fun executeMutation(mutationRef: MutationRef): Promise<OperationResult>
Link copied to clipboard
external fun executeQuery(queryRef: QueryRef, options: JsAny): Promise<OperationResult>

options is { fetchPolicy: "PREFER_CACHE" | "CACHE_ONLY" | "SERVER_ONLY" }.

Link copied to clipboard
external fun getDataConnect(app: FirebaseApp, connectorConfig: JsAny, settings: JsAny): DataConnect

connectorConfig is { location, connector, service }; settings is { cacheSettings?: { cacheProvider, maxAgeSeconds? } }.

Link copied to clipboard
Link copied to clipboard
external fun mutationRef(dc: DataConnect, mutationName: String, variables: JsAny?): MutationRef
Link copied to clipboard
external fun queryRef(dc: DataConnect, queryName: String, variables: JsAny?): QueryRef
Link copied to clipboard
external fun setLogLevel(logLevel: String)
Link copied to clipboard
external fun terminate(dataConnect: DataConnect): Promise<JsAny?>