firebase-data-connect

Build and deploy Firebase Data Connect backends with PostgreSQL schemas, GraphQL operations, and generated SDKs.

Updated Aug 5, 2024
One-click install
npx skills add https://github.com/nikhilkakarla/nikhilkakarla.github.io --skill firebase-data-connect-nikhilkakarla
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: firebase-data-connect
Source: https://github.com/nikhilkakarla/nikhilkakarla.github.io/tree/main/.agents/skills/firebase-data-connect
Command: npx skills add https://github.com/nikhilkakarla/nikhilkakarla.github.io --skill firebase-data-connect-nikhilkakarla

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Designing a relational backend with Firebase Data Connect requires mastering GraphQL schema directives, authorization rules, connector configuration, and multi-platform SDK generation, which is error-prone without structured guidance. ## Core Features & Use Cases - Schema Design: Define PostgreSQL-backed data models with @table, relationships, indexes, enums, and vector or full-text search fields. - Operations & Security: Write queries and mutations with filtering, pagination, upserts, transactions, and row-level authorization using @auth, @check, and @redact. - SDK Generation & Deployment: Generate type-safe SDKs for Web, Android, iOS, and Flutter, run the local emulator, and deploy with schema migrations via the Firebase CLI. - Use Case: Build a movie review app where users upsert profiles, post one review per movie, and browse public movie listings with nested actor and review data. ## Quick Start Ask the AI to design a Firebase Data Connect schema and queries for your app idea, such as a blog with user-owned posts and public read access.

Frequently Asked Questions about firebase-data-connect

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

FAQPage Schema
How do I define a schema in Firebase Data Connect?▼

Define GraphQL types with the @table directive in schema.gql, and Data Connect maps them to PostgreSQL tables with an auto-generated UUID primary key. Use @col, @default, @unique, and @index to customize columns, defaults, constraints, and indexes.

How do I write queries and mutations in Firebase Data Connect?▼

Write operations in queries.gql and mutations.gql using auto-generated fields like movies, movie_insert, movie_update, and movie_upsert. Queries support where filters, orderBy, limit, and offset, while mutations support server expressions like auth.uid and request.time.

Does Firebase Data Connect support vector and full-text search?▼

Yes, Vector fields with @col(size: N) enable similarity search via Vertex AI embeddings, and @searchable enables PostgreSQL full-text search. Data Connect generates _similarity and _search query fields with distance methods and relevance scoring.

How do I secure Firebase Data Connect operations?▼

Add @auth(level: PUBLIC, USER, or NO_ACCESS) to every operation and filter data with eq_expr: "auth.uid" for user-owned resources. Use @check and @redact inside @transaction mutations to validate database permissions before writes.

Which platforms can use generated Data Connect SDKs?▼

Data Connect generates type-safe SDKs for Web (TypeScript), Android (Kotlin), iOS (Swift), and Flutter (Dart), configured in connector.yaml. A Node.js Admin SDK is also available for server-side operations that bypass @auth rules.

How do I deploy Firebase Data Connect to production?▼

Run firebase deploy --only dataconnect after testing locally with the emulator. Use dataconnect:sql:diff to preview PostgreSQL migrations and dataconnect:sql:migrate to apply them, with --force for breaking schema changes.