You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firebase Data Connect is a relational database service for mobile and web apps that lets you build and scale using a fully-managed PostgreSQL database powered by Cloud SQL. It provides secure schema, query and mutation management using GraphQL technology that integrates well with Firebase Authentication.
6
+
7
+
To get started, ensure you have setup your Firebase project and have the Data Connect setup in your project. To learn more,
8
+
follow the [Firebase Data Connect documentation](https://firebase.google.com/docs/data-connect/quickstart).
9
+
10
+
## Setup
11
+
12
+
Before using the Tanstack Query Firebase hooks for Data Connect, ensure you have configured your application using your chosen connector:
13
+
14
+
```ts
15
+
// app.config.ts
16
+
exportconst appConfig:ApplicationConfig= {
17
+
providers: [
18
+
...
19
+
provideFirebaseApp(() =>
20
+
initializeApp(/*Replace with your firebase config*/)
To use the Tanstack Query Firebase injectors, you can either use the generated SDKs, or the `injectDataConnectQuery` injector to fetch data from the database:
39
+
40
+
### Using the Generated SDK
41
+
42
+
The generated SDK reduces the boilerplate required to use Tanstack Query Firebase's injectors. Instead of having to provide a ref to `injectDataConnectQuery`, you simply need to call the generated
The hooks will automatically infer the data type from the connector and the query and automtically create a [query key](https://tanstack.com/query/latest/docs/framework/react/guides/query-keys) for the query.
111
+
112
+
## Learning more
113
+
114
+
To learn more about the Data Connect hooks, check out the following pages:
0 commit comments