firebase-admin.data-connect package

Firebase Data Connect service.

Functions

Function Description
getDataConnect(connectorConfig, app) Gets the DataConnect service with the provided connector configuration for the default app or a given app.getDataConnect(connectorConfig) can be called with no app argument to access the default app's DataConnect service or as getDataConnect(connectorConfig, app) to access the DataConnect service associated with a specific app.

Classes

Class Description
DataConnect The Firebase DataConnect service interface.

Interfaces

Interface Description
ConnectorConfig Interface representing a Data Connect connector configuration.
ExecuteGraphqlResponse Interface representing GraphQL response.
GraphqlOptions Interface representing GraphQL options.

getDataConnect(connectorConfig, app)

Gets the DataConnect service with the provided connector configuration for the default app or a given app.

getDataConnect(connectorConfig) can be called with no app argument to access the default app's DataConnect service or as getDataConnect(connectorConfig, app) to access the DataConnect service associated with a specific app.

Signature:

export declare function getDataConnect(connectorConfig: ConnectorConfig, app?: App): DataConnect;

Parameters

Parameter Type Description
connectorConfig ConnectorConfig Connector configuration for the DataConnect service.
app App Optional app for which to return the DataConnect service. If not provided, the default DataConnect service is returned.

Returns:

DataConnect

The default DataConnect service with the provided connector configuration if no app is provided, or the DataConnect service associated with the provided app.

Example 1

const connectorConfig: ConnectorConfig = {
 location: 'us-west2',
 serviceId: 'my-service',
};

// Get the `DataConnect` service for the default app
const defaultDataConnect = getDataConnect(connectorConfig);

Example 2

// Get the `DataConnect` service for a given app
const otherDataConnect = getDataConnect(connectorConfig, otherApp);