🚌 LocoBus GraphQL API
Trip Management System - Development Server
📍 Endpoints
POST /graphql
Main GraphQL endpoint for queries and mutations
GET /health
Health check endpoint
GET /public/schema.graphql
Download GraphQL schema (SDL format)
🔐 Authentication
All GraphQL requests require an Authorization header:
📝 Example Request (Postman/cURL)
POST http://localhost:4000/graphql Content-Type: application/json Authorization: Bearer
mock-token { "query": "query GetTrips { trips(first: 10) { edges { node { id destination
arrivalDate departureDate } } totalCount } }" }
🚀 Using Apollo Sandbox
For an interactive GraphQL explorer:
- Click "Apollo Sandbox" button above
-
Enter endpoint:
http://localhost:4000/graphql
-
Add header:
Authorization: Bearer mock-token
- Explore the schema and run queries!
📚 Documentation
For detailed API documentation, mutations, and examples, see:
backend/API_DOCUMENTATION.md
specs/001-trip-management/contracts/schema.graphql