Introduction
The 5Stack GraphQL API provides a powerful and flexible interface for managing Counter-Strike 2 matches, tournaments, players, and servers. Built on top of Hasura, it offers real-time subscriptions, efficient querying, and a type-safe schema.GraphQL Endpoint
The GraphQL API is available at:Key Features
Type-Safe Queries
Strongly-typed schema with full TypeScript support using Zeus codegen
Real-Time Updates
WebSocket subscriptions for live match data and tournament updates
Efficient Data Fetching
Request exactly the data you need with GraphQL field selection
Batch Operations
Execute multiple queries or mutations in a single request
Client Configuration
5Stack uses Apollo Client with custom configuration for optimal performance:Zeus Code Generation
5Stack uses GraphQL Zeus for type-safe GraphQL operations. Zeus generates TypeScript types and helper functions from your schema:Fetch Policies
The default Apollo Client configuration uses these fetch policies:- Queries:
network-only- Always fetch fresh data from the server - Watch Queries:
cache-and-network- Return cached data immediately, then update with network data
Error Handling
The API uses Apollo’s error link to handle GraphQL errors gracefully:Rate Limiting
The API includes automatic retry logic with exponential backoff:- Initial delay: 300ms
- Maximum delay: 60 seconds
- Maximum retries: 30 attempts
- 401 (Unauthorized) errors are not retried
Next Steps
Authentication
Learn how to authenticate your API requests
Queries
Explore available GraphQL queries
Mutations
Learn about data modification operations
Subscriptions
Set up real-time data subscriptions