GraphQL Main API
Welcome to the GraphQL Main API documentation. This section provides detailed information about all available queries and mutations in the GraphQL Main API, their parameters, return types, and example usage.
Overview​
The GraphQL Main API serves as the primary interface for the BlockBet frontend applications. It handles core functionality including authentication, user management, token operations, and content delivery.
Endpoint​
All GraphQL Main API requests should be made to:
https://gql.blockbet.gg/graphql
Authentication​
Authentication is handled automatically via HTTP cookies. The system manages both accessToken and refreshToken cookies, so there's no need to manually set the Authorization header.
When you successfully authenticate, the tokens will be set in cookies and automatically included in subsequent requests.
Available Modules​
The GraphQL Main API provides access to the following modules:
- Authentication: User registration, login, social authentication (Google, Facebook, Telegram), wallet-based authentication (EVM), and session management
- User Management: User profile management, preferences, session control, and chat functionality
- Multi-Factor Authentication (MFA): Setup and verification for additional security layers
- Token Operations: Token-related functionality, transactions, and statistics
- File Upload: Media and document upload management
- Buy Back: Token buy-back operations and statistics
- Sliders: Dynamic content management for home, auth, and token sliders
- Reports: Analytics and reporting functionality
- Popup: Notification and modal management
- Session Management: User session handling and security
Schema Exploration​
You can explore the full GraphQL schema using tools like:
- GraphQL Playground: Access it at
https://gql.blockbet.gg/graphql
- Apollo Studio: Connect to our endpoint for enhanced exploration
Error Handling​
All operations follow standard GraphQL error patterns with detailed error messages and codes. Common error types include:
- Authentication errors: Issues with tokens or permissions
- Validation errors: Invalid input data
- Business logic errors: Violations of business rules