firebase-data-connect

Builds and deploys Firebase SQL Connect backends with PostgreSQL schemas, authorized GraphQL operations, and type-safe SDKs.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/Aadi-110i/PEP-PROJECT --skill firebase-data-connect-aadi-110i
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firebase-data-connect
Source: https://github.com/Aadi-110i/PEP-PROJECT/tree/main/skills/firebase-data-connect
Command: npx skills add https://github.com/Aadi-110i/PEP-PROJECT --skill firebase-data-connect-aadi-110i

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires firebase-tools, and includes references (resource) components.

What problem does it solve? Setting up a relational database backend with Firebase requires coordinating PostgreSQL schemas, GraphQL operations, authorization rules, and client SDK generation across multiple platforms, which is error-prone without structured guidance. ## Core Features & Use Cases - Schema and Data Modeling: Define GraphQL types with @table, relationships (one-to-many, many-to-many), indexes, and constraints that map to Cloud SQL for PostgreSQL. - Authorized Operations: Write queries and mutations with @auth, @check, and @redact directives for row-level security, plus transactions and upserts. - Realtime and Advanced Features: Configure @refresh subscriptions, vector similarity search, full-text search, and Native SQL for PostGIS or window functions. - Type-Safe SDK Generation: Generate client SDKs for Web, Android, iOS, Flutter, and Node.js Admin with a single CLI command. - Use Case: Build a movie review app by defining the schema, writing authorized queries, running the local emulator, and generating a TypeScript SDK for your web frontend. ## Quick Start Ask the AI to initialize Firebase SQL Connect in your project and create a schema with queries for your app's data model.

Frequently Asked Questions about firebase-data-connect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Firebase Data Connect with PostgreSQL?

Run npx firebase-tools init dataconnect to scaffold the dataconnect directory with dataconnect.yaml, schema.gql, and connector files. Then define your GraphQL types with @table, write operations, and validate with firebase dataconnect:compile before deploying.

How do I write authorized queries in Firebase SQL Connect?

Use the @auth directive with levels PUBLIC, USER, or NO_ACCESS on each operation. Add @check and @redact for row-level validation, and reference auth.uid in expressions to scope data to the current user.

When should I use Native SQL instead of GraphQL in Data Connect?

Use Native SQL only for PostgreSQL-specific features like PostGIS, window functions, or complex aggregations that GraphQL cannot express. Native SQL bypasses type safety, so default to generated GraphQL operations for standard CRUD and filtering.

Does Firebase Data Connect support realtime subscriptions?

Yes, single-entity lookups refresh automatically, while list queries use the @refresh directive with time-based polling or mutation-triggered conditions. Clients consume updates via the subscribe() method in generated SDKs.

How do I generate type-safe client SDKs for Data Connect?

Configure SDK outputs in connector.yaml for JavaScript, Kotlin, Swift, Dart, or Node.js Admin, then run firebase dataconnect:sdk:generate. Regenerate and redeploy whenever operations change, since operations are stored server-side.

Why does my Native SQL query fail validation in Data Connect?

Common causes include mixing positional parameters ($1) with GraphQL variables, using line comments instead of block comments, or referencing camelCase fields instead of snake_case column names. Quoted identifiers are required for tables with explicit capitalized names.