<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/data-connect-and-graphql-4nu3fagit" -->

---
title: Data Connect and GraphQL | daily.dev
description: Firebase Data Connect uses GraphQL to define schemas, queries, and mutations against a PostgreSQL database hosted on Cloud SQL. The post explains what GraphQL...
canonical: https://daily.dev/posts/data-connect-and-graphql-4nu3fagit
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Data Connect and GraphQL | daily.dev
og:description: Firebase Data Connect uses GraphQL to define schemas, queries, and mutations against a PostgreSQL database hosted on Cloud SQL. The post explains what GraphQL...
og:url: https://daily.dev/posts/data-connect-and-graphql-4nu3fagit
og:image: https://api.daily.dev/og/posts/4Nu3fagit.png
og:image:alt: Data Connect and GraphQL
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Connect and GraphQL

**[Firebase](https://daily.dev/sources/firebase-blog)** · 7 min read · 0 upvotes · 0 comments

## Summary

Firebase Data Connect uses GraphQL to define schemas, queries, and mutations against a PostgreSQL database hosted on Cloud SQL. The post explains what GraphQL is, why the Firebase team chose it (terse syntax, strong typing, language agnosticism, directive customization, community support), and walks through defining a movie review schema, writing queries with filters and auth directives, and using auto-generated mutations for CRUD operations. Data Connect is currently in public preview.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2024/10/dataconnect-graphql>

## Questions this post answers

### How does Firebase Data Connect use GraphQL with a database?

Firebase Data Connect uses GraphQL as the schema and query language on top of a PostgreSQL database hosted on Cloud SQL, requiring no manual GraphQL server setup. Developers define types with GraphQL schemas (e.g., a Movie type with fields like title and rating), and Data Connect auto-generates queries, mutations, type-safe client SDKs, and auth integration from that schema.

_Developers comparing GraphQL backends can track new BaaS patterns like this one on daily.dev._

### What auth directive controls access to a GraphQL query in Firebase Data Connect?

The @auth directive controls access, for example @auth(level: USER) restricts a query to logged-in users, while @auth(expr: "auth.token.admin == true") restricts a mutation to admin users only. Every query or mutation can declare its own auth requirement directly in the GraphQL operation definition.

_Anyone wiring up auth rules in GraphQL APIs can keep patterns like this handy on daily.dev._

### What mutations does Firebase Data Connect auto-generate for a GraphQL type?

For each table defined in a schema, Data Connect automatically generates insert, upsert, update, updateMany, delete, and deleteMany mutations, for example movie_insert, movie_upsert, movie_update, movie_updateMany, movie_delete, and movie_deleteMany for a Movie type. These implicit mutations can then be composed into more complex custom mutations.

_Developers scaffolding CRUD APIs can follow ongoing GraphQL tooling coverage on daily.dev._

## Similar posts on daily.dev

- [GraphQL as Connective Tissue](https://daily.dev/posts/graphql-as-connective-tissue-mxmyfqbza) · API Evangelist · 2 upvotes · 2 comments
- [Angular and GraphQL: From REST to GraphQL Part 1](https://daily.dev/posts/angular-and-graphql-from-rest-to-graphql-part-1-ryvhlfldm) · Telerik · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#backend](https://daily.dev/tags/backend), [#postgresql](https://daily.dev/tags/postgresql), [#graphql](https://daily.dev/tags/graphql), [#firebase](https://daily.dev/tags/firebase)

[View this post on daily.dev](https://daily.dev/posts/data-connect-and-graphql-4nu3fagit)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Data Connect and GraphQL","url":"https://daily.dev/posts/data-connect-and-graphql-4nu3fagit","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/data-connect-and-graphql-4nu3fagit"},"datePublished":"2026-08-23T12:18:29.610Z","dateModified":"2026-08-23T12:29:09.409Z","description":"Firebase Data Connect uses GraphQL to define schemas, queries, and mutations against a PostgreSQL database hosted on Cloud SQL. The post explains what GraphQL...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/data-connect-and-graphql-4nu3fagit","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,backend,postgresql,graphql,firebase","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Data Connect and GraphQL"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/data-connect-and-graphql-4nu3fagit#faq","mainEntity":[{"@type":"Question","name":"How does Firebase Data Connect use GraphQL with a database?","acceptedAnswer":{"@type":"Answer","text":"Firebase Data Connect uses GraphQL as the schema and query language on top of a PostgreSQL database hosted on Cloud SQL, requiring no manual GraphQL server setup. Developers define types with GraphQL schemas (e.g., a Movie type with fields like title and rating), and Data Connect auto-generates queries, mutations, type-safe client SDKs, and auth integration from that schema. Developers comparing GraphQL backends can track new BaaS patterns like this one on daily.dev."}},{"@type":"Question","name":"What auth directive controls access to a GraphQL query in Firebase Data Connect?","acceptedAnswer":{"@type":"Answer","text":"The @auth directive controls access, for example @auth(level: USER) restricts a query to logged-in users, while @auth(expr: \"auth.token.admin == true\") restricts a mutation to admin users only. Every query or mutation can declare its own auth requirement directly in the GraphQL operation definition. Anyone wiring up auth rules in GraphQL APIs can keep patterns like this handy on daily.dev."}},{"@type":"Question","name":"What mutations does Firebase Data Connect auto-generate for a GraphQL type?","acceptedAnswer":{"@type":"Answer","text":"For each table defined in a schema, Data Connect automatically generates insert, upsert, update, updateMany, delete, and deleteMany mutations, for example movie_insert, movie_upsert, movie_update, movie_updateMany, movie_delete, and movie_deleteMany for a Movie type. These implicit mutations can then be composed into more complex custom mutations. Developers scaffolding CRUD APIs can follow ongoing GraphQL tooling coverage on daily.dev."}}]}
```

