Data Connect Updates

Google I/O 2025 is officially underway, and we’re excited to release a suite of new features for Data Connect, a backend-as-a-service for Cloud SQL Postgres! Just last month at Cloud Next, Data Connect announced its General Availability, and we’ve been hard at work to make Data Connect more powerful and easier to use.

What’s new?

Transaction Updates

Complex operations can require multiple database changes that must either all succeed or all fail, and Data Connect already supported these all-or-nothing operations known as transactions. Now, we’re excited to announce additional transactions support where you can execute a series of operations, query for data, and then execute another series of operations using information returned from a previous atomic step.

Consider this example transferring money between bank accounts:

mutation TransferMoney(
  $from: UUID,
  $to: UUID,
  $amount: Int
) @transaction {
  # Step 1: take money out from employer account
  bank_update_amount(data: {
    id: $from,
    balance_update: {dec: $amount},
    timestamp_expr:request.time# auto-generated
  })

  # Step 2: add money to employee account
  bank_update_amount(data: {
    id: $to,
    balance_update: {inc: $amount},
    timestamp_expr:response.bank_decrease.timestamp# grab generated timestamp from above
  })
}

In this example, you no longer need to pass in a $time variable. Instead, the timestamp_expr: “request.time” in the first step automatically generates a timestamp. Then, the second bank_update_amount operation reusesresponse.bank_decrease.timestamp from the previous step, ensuring consistency across the transaction. This is facilitated by a new top-level binding in expressions that represents the partial response object, including all top-level mutation fields before the current one. We also now support <field>_expr for most scalar types, which is handy when you need a dynamic value from auth.token, a previous step, or computed values.

Learn more about transaction support in the documentation.

Gemini-powered development: from idea to deployment

We’re taking AI-assisted development to the next level! Check out our new Gemini in Firebase flow in the console that will help you:

  • Generate App Schemas: Describe your data model in natural language, and Gemini will help you draft and modify the schema.
  • Create Queries and Mutations: Based on your schema and requirements, Gemini can assist in generating the necessary GraphQL queries and mutations.
  • Deploy with Data Connect: Seamlessly deploy your configurations to use in your app.

FDC Gemini Code Assist Integration for VSCode

Data Connect’s VS Code extension is now integrating with Gemini Code Assist, bringing the beloved schema and query generation features from the Firebase Console directly into your VS Code environment! Use the @data-connect tool to generate and refine your FDC schemas, queries, and mutations in GQL with Gemini without leaving your IDE.

FDC with Gemini Code Assist
FDC with Gemini Code Assist

Model Context Protocol (MCP) Server Rules

The Model Context Protocol (MCP) is an emerging standard enabling AI systems to securely and effectively interact with various tools and data sources. We’re introducing capabilities to define rules and configurations for MCP servers in conjunction with Data Connect. This gives you more controlled and secure interactions with both first-party and third-party AI agents to access or modify your Firebase-managed data.

{
  "mcpServers": {
    "firebase": {
      "command": "npx",
      "args": ["-y", "firebase-tools@latest", "experimental:mcp"]
    }
  }
}
Firebase MCP server
Firebase MCP server
Firebase MCP server rules
Firebase MCP server rules

Admin Bulk Data Import

Managing large datasets is now easier with new admin bulk data import. Using the Firebase Admin SDK, you can perform bulk operations such as insertMany and upsertMany to populate or update your Data Connect tables. This is useful for initial data seeding, migrations, or batch updates from external systems:

import { initializeApp } from 'firebase-admin/app';
import { getDataConnect } from 'firebase-admin/data-connect';

const data = [
  { id:"1", genre: "Action", title: "The Great Adventure" },
  { id:"2", genre: "Sci-Fi", title: "The Before Time" }
];

async function importData() {
  // insert many
  const respMany = await dc.insertMany("movie" /*table name*/, data);

  // upsert one
  const respUpsert = await dc.upsert("movie" /*table name*/, data[0]);

  // upsert many
  const respUpsertMany = await dc.upsertMany("movie" /*table name*/, data);
}

importData().catch(console.error);

Try it out!

We’re incredibly excited to see what you build with these new Data Connect features! Your feedback is invaluable, so please continue to share your thoughts and requests on Firebase’s UserVoice using the “Data Connect” tag!