DataConnect class

The Firebase DataConnect service interface.

Signature:

export declare class DataConnect 

Properties

Property Modifiers Type Description
app App
connectorConfig ConnectorConfig

Methods

Method Modifiers Description
executeGraphql(query, options) (BETA) Execute an arbitrary GraphQL query or mutation
executeGraphqlRead(query, options) (BETA) Execute an arbitrary read-only GraphQL query

DataConnect.app

Signature:

readonly app: App;

DataConnect.connectorConfig

Signature:

readonly connectorConfig: ConnectorConfig;

DataConnect.executeGraphql()

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Execute an arbitrary GraphQL query or mutation

Signature:

executeGraphql<GraphqlResponse, Variables>(query: string, options?: GraphqlOptions<Variables>): Promise<ExecuteGraphqlResponse<GraphqlResponse>>;

Parameters

Parameter Type Description
query string The GraphQL query or mutation.
options GraphqlOptions<Variables> Optional GraphqlOptions when executing a GraphQL query or mutation.

Returns:

Promise<ExecuteGraphqlResponse<GraphqlResponse>>

A promise that fulfills with a ExecuteGraphqlResponse.

DataConnect.executeGraphqlRead()

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Execute an arbitrary read-only GraphQL query

Signature:

executeGraphqlRead<GraphqlResponse, Variables>(query: string, options?: GraphqlOptions<Variables>): Promise<ExecuteGraphqlResponse<GraphqlResponse>>;

Parameters

Parameter Type Description
query string The GraphQL read-only query.
options GraphqlOptions<Variables> Optional GraphqlOptions when executing a read-only GraphQL query.

Returns:

Promise<ExecuteGraphqlResponse<GraphqlResponse>>

A promise that fulfills with a ExecuteGraphqlResponse.