Auto-generated GraphQL API via pg_graphql
Fast GraphQL APIs using our custom Postgres GraphQL extension.
Stage:
General Availability
Available on self-hosted:
Yes
Supabase offers lightning-fast GraphQL APIs through its custom-built Postgres GraphQL extension, pg_graphql.
Key benefits
- Simplified data fetching: Retrieve exactly the data you need in a single request, reducing over-fetching and under-fetching.
- Automatic schema generation: GraphQL schema is automatically derived from your Postgres schema, ensuring consistency.
- Real-time updates: Combine with Supabase's real-time features for live data subscriptions.
- Improved performance: Leverage Postgres's query optimization capabilities for efficient GraphQL resolvers.
- Type safety: Benefit from GraphQL's strong typing system, reducing runtime errors and improving developer experience.
- Flexible querying: Allow clients to request complex, nested data structures in a single query.
- Built-in documentation: Utilize GraphQL's introspection feature for self-documenting APIs.
The auto-generated GraphQL API is particularly beneficial for:
- Single-page applications (SPAs) requiring efficient data loading
- Mobile apps needing to minimize data transfer
- Complex UIs with varying data requirements
- Projects requiring rapid iteration on data models
- Applications with deeply nested data structures