Instant GraphQL API
Product · API / developer platform · Engineering & development by Nhost
Instant, Secure GraphQL API on Top of Postgres
An auto-generated, real-time GraphQL API for PostgreSQL databases that provides instant queries, mutations, and granular security permissions for developers.
- Price
- From 0 USD
- Languages
- GraphQL
Category: API Management
- Platforms
- Web, API
- Integrations
- PostgreSQL, Hasura, Stripe, GitHub, Slack, PagerDuty, Teams
- Languages
- English
- API Protocol
- GraphQL
- Database Engine
- PostgreSQL
- GraphQL Engine
- Hasura / Constellation
- Auto-generated GraphQL API from Postgres schema
- Real-time subscriptions for collaborative apps
- Row and column-level security permissions
- Data federation for unified API access
- Built-in full-text search and advanced querying
Overview
Instant GraphQL API is a core component of the Nhost platform that automatically generates a high-performance API from a PostgreSQL database schema. It allows developers to perform queries, mutations, and real-time subscriptions without writing backend code, solving the problem of manual API layer development. The service features a powerful permission system for row-level and column-level security, ensuring users only access authorized data based on their roles. Through data federation and remote schemas, it can unify multiple data sources, including third-party REST APIs and custom services, into a single endpoint. It is designed to optimize performance by compiling GraphQL queries into single SQL queries, effectively eliminating the N+1 problem. The API is compatible with popular clients such as Apollo, URQL, and React Query, and includes built-in features like full-text search and observability metrics.
API Capabilities
- Auto-generated API: Generate a powerful GraphQL API automatically from the database schema including queries and mutations.
- Realtime Subscriptions: Create modern, collaborative applications with GraphQL subscriptions that push live data updates to clients in real-time.
- Data Federation: Connect multiple data sources, third-party REST APIs, and custom services into a single, unified GraphQL API.
- Actions: Add custom queries and mutations backed by webhooks to extend the API beyond standard database operations.
- Computed Fields: Expose Postgres function results as virtual columns within the GraphQL API.
Security and Performance
- Row Level Security: Control exactly what data users can access based on their identity or role without writing complex authorization code.
- Column Level Security: Hide sensitive fields from unauthorized users to protect personal information while allowing access to other table data.
- Observability Metrics: Monitor request rate, duration, and failure rate through integrated observability metrics.
- Query Optimization: Compile all GraphQL queries into a single SQL query to eliminate performance bottlenecks and solve the N+1 problem.
- Full-text Search: Powerful full-text search capabilities are built right into the GraphQL API without needing a separate search engine.
Developer Experience
- Nhost JS SDK Client: The Nhost JavaScript SDK includes a simple GraphQL client for basic operations.
- Third-party Client Support: The API is agnostic and works with popular clients including Apollo Client, URQL, React Query, and SWR.
- Advanced Querying: Filter, sort, order by, group, aggregate, limit, and offset data using a type-safe GraphQL API.
- Event Triggers: Trigger webhooks from database changes, schedules, or one-time events to build async business workflows.
Use cases
- Developers build collaborative apps with live cursors and avatars using real-time GraphQL subscriptions.
- Engineering teams unify multiple data sources and third-party APIs into a single endpoint using data federation.
- SaaS startups implement complex authorization rules without writing backend code using row and column-level security.
- Frontend developers query and mutate database records directly from the client using the auto-generated API.
Specifications
- APIs and SDKs
- GraphQL API, Nhost JavaScript SDK, Apollo Client, URQL, React Query, SWR
- Platforms
- Web, API
- Deployment
- Cloud (San Francisco, New York, London, Amsterdam, Bangalore)
- Integrations
- PostgreSQL, Hasura, Stripe, GitHub, Slack, PagerDuty, Teams
- Languages
- English
- API Protocol
- GraphQL
- Database Engine
- PostgreSQL
- GraphQL Engine
- Hasura / Constellation
- Authorization Model
- Role-based access control (RBAC)
- Security Features
- Row and Column Level Security
- Query Features
- Filter, sort, aggregate, full-text search
- Real-time Support
- GraphQL Subscriptions
- Deployment Regions
- 6 Regions across 4 Continents
How it works
- Define Schema: Define your database schema in the Nhost dashboard or via SQL to automatically generate the GraphQL API.
- Configure Permissions: Use the intuitive interface to set row and column-level security rules based on user roles and identity.
- Connect Client: Connect your frontend application using the Nhost SDK or any standard GraphQL client like Apollo or URQL.
- Deploy and Scale: Deploy changes with a single git push, which automatically updates the API and permissions in production.
Plans
- Starter: 0 month
- Realtime APIs: Access to the auto-generated GraphQL API with real-time subscriptions.
- IaC Support: Manage infrastructure as code using the Nhost CLI and configuration.
- Automated Deployments: Deploy your application automatically with built-in CI/CD.
- Pro: 25 month
- Automated Backups: Daily automated backups and point-in-time recovery for the database.
- Add-ons Support: Access to add-ons including the AI toolkit and custom domains.
- Managed Grafana: Monitor performance with managed Grafana metrics and alerting.
- Team: 599 month
- Advanced GraphQL Features: Access to advanced GraphQL features and data federation.
- External Databases: Connect to external databases hosted outside of Nhost.
Pricing
- Starter Plan
- $0 / month
- Pro Plan
- From $25 / month
- Team Plan
- From $599 / month
FAQ
How does Nhost handle the N+1 problem?
Nhost solves the N+1 problem by compiling all GraphQL queries into a single SQL query, which improves performance.
Can I connect multiple data sources to one API?
Yes, Nhost supports data federation, allowing you to connect multiple data sources, third-party REST APIs, and custom services into a single, unified GraphQL API.
How are permissions managed in the GraphQL API?
Nhost provides granular, role-based permissions at the level of rows and columns, allowing you to control exactly what data users can access without writing authorization code.
Which GraphQL clients are supported?
Nhost is agnostic regarding the client and works well with Apollo Client, URQL, React Query, SWR, and the Nhost JavaScript SDK.
Added by AntSpace from public sources (nhost.io).