Key Principles
Rendering-First Design
- Returns only fields needed for display and execution
- Excludes CMS/editorial metadata not required for rendering
- Includes compiled code ready for execution
- Provides resolved dependencies in a single request
Published Content Only
- Always returns the latest published version
- No draft or unpublished content access
- Assets are always active (deleted assets excluded)
- Simplified status model: everything returned is ready to render
API Key Authentication
- Designed for client-side applications
- Uses the same API keys as REST endpoints
- Read-only access to published resources
- No user authentication required
Simplified Schema
- No versioning complexity in queries
- No status or permission fields
- Cleaner type definitions
- Consistent naming with REST API
Real-time Subscriptions
- WebSocket-based GraphQL subscriptions
- Watch specific content for updates
- Automatic filtering to published content
- Efficient multiplexing over single connection
Preview Link Support
- Token-based authentication (no API key required)
- Access to draft components and unpublished content
- Real-time updates via WebSocket subscriptions
- Version-specific component previews
Endpoint
The GraphQL API is available at:Environments
| Environment | URL |
|---|---|
| Production | https://api.metabind.ai/graphql |
| Staging | https://api.staging.metabind.ai/graphql |
| Development | https://api.dev.metabind.ai/graphql |
Authentication
GraphQL requests require an API key in the request header:Preview Link Authentication
Preview queries and subscriptions use apreview-token header instead of an API key:
Making Requests
HTTP POST
JavaScript
Apollo Client
Response Format
Successful responses follow the standard GraphQL format:errors array:
