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
Copy file name to clipboardExpand all lines: dataconnect/README.md
+50-27Lines changed: 50 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,33 @@ For more information about Firebase Data Connect visit [the docs](https://fireba
11
11
Follow these steps to get up and running with Firebase Data Connect. For more detailed instructions,
12
12
check out the [official documentation](https://firebase.google.com/docs/data-connect/quickstart).
13
13
14
-
### 1. Create a New Data Connect Service and Cloud SQL Instance
15
-
16
-
1. Open [Firebase Data Connect](https://console.firebase.google.com/u/0/project/_/dataconnect) in
17
-
your project in Firebase Console and select Get Started.
18
-
2. Create a new Data Connect service and a Cloud SQL instance. Ensure the Blaze plan is active.
19
-
Pricing details can be found at [Firebase Pricing](https://firebase.google.com/pricing).
20
-
3. Select your server region, if you wish to use vector search, make sure to select `us-central1` region.
21
-
4. Allow some time for the Cloud SQL instance to be provisioned. After it's provisioned, the instance
22
-
can be managed in the [Cloud Console](https://console.cloud.google.com/sql).
14
+
### 1. Connect to your Firebase project
15
+
16
+
1. If you haven't already, create a Firebase project.
17
+
1. In the [Firebase console](https://console.firebase.google.com), click
18
+
**Add project**, then follow the on-screen instructions.
19
+
20
+
2. Upgrade your project to the Blaze plan. This lets you create a Cloud SQL
21
+
for PostgreSQL instance.
22
+
23
+
> Note: Though you set up billing in your Blaze upgrade, you won't be
24
+
charged for usage of {{data_connect_short}} or the
25
+
[default Cloud SQL for PostgreSQL configuration](https://firebase.google.com/docs/data-connect/#pricing)
26
+
during the preview.
27
+
28
+
3. Navigate to the [Data Connect section](https://console.firebase.google.com/u/0/project/_/dataconnect)
29
+
of the Firebase console and follow the setup workflow:
30
+
- Select a location for your Cloud SQL for PostgreSQL database.
31
+
- Fill in the following fields:
32
+
- Service ID: `dataconnect`
33
+
- Cloud SQL Instance: `cloud-sql-instance`
34
+
- Database name: `postgres`
35
+
4. Allow some time for the Cloud SQL instance to be provisioned. After it's provisioned, the instance
36
+
can be managed in the [Cloud Console](https://console.cloud.google.com/sql).
37
+
38
+
5. Download and then add the Firebase Android configuration file (`google-services.json`) to your app:
39
+
1. Click **Download google-services.json** to obtain your Firebase Android config file.
40
+
2. Move your config file into the module (app-level) root directory of your app.
23
41
24
42
### 2. Set Up Firebase CLI
25
43
@@ -32,24 +50,29 @@ npm install -g firebase-tools
32
50
### 3. Cloning the repository
33
51
This repository contains the quickstart to get started with the functionalities of Data Connect.
34
52
35
-
1. Clone this repository to your local machine.
36
-
1. (Private Preview only) Checkout the `fdc-quickstart` branch and open the project in Android Studio.
37
-
1. Open the a terminal window and initialize your Firebase project with `firebase init dataconnect`.
38
-
1. Overwrite only dataconnect.yaml when prompted, do not overwrite any other dataconnect files.
39
-
(Optional): If you intend on using other Firebase features, run `firebase init` instead, and select both DataConnect options as well as any feature you intend to use.
40
-
1. Allow domains for Firebase Auth in your [project console](https://console.firebase.google.com/project/_/authentication/settings) (e.g. http://127.0.0.1).
41
-
42
-
### 4. Running queries and mutations in VS Code
43
-
The VSCode Firebase Extension allows you to generate Firebase Data Connect SDK code, run queries/mutations, and deploy Firebase Data Connect with a click. Alternatively, see below for CLI commands.
2. Download the [Firebase extension](https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/vsix%2Ffirebase-vscode-latest.vsix?alt=media) and [install](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-an-extension) it.
47
-
3. Open this quickstart in VS code, and in the left pane of the Firebase extension, and log in with your Firebase account.
48
-
(Optional): If your Firebase project was not initialized in the last section, you can click `Run firebase init` and select `Data Connect` to initialize.
49
-
4. Click on deploy to deploy your schema to your cloud SQL instance. Or run `firebase deploy --only dataconnect` (this will also activate vectors search if it's enabled in the schema).
50
-
5. Running the VSCode extension should automatically start the DataConnect emulators. If you see an emulators error, try running `firebase emulators:start dataconnect` manually.
51
-
52
-
Now you should be able to deploy your schema, run mutations/queries, generate SDK code, and view your application locally.
1. Run `1_movie_insert.gql`, `2_actor_insert.gql`, `3_movie_actor_insert.gql`, and `4_user_favorites_review_insert.gql` files in the `./dataconnect` directory in order using the VS code extension,
0 commit comments