- β¨ Features
- π¬ Demo
- π Quick Start
- π API Endpoints
- π Example Queries
- π οΈ Tech Stack
- π Project Structure
- π CI/CD Workflows
- π License
- π¨βπ» Author
- π Acknowledgements
- π Dual GraphQL Engines - Choose between Apollo Server and GraphQL Yoga interfaces
- π Complete F1 Database - Access comprehensive Formula 1 historical data
- π Automated Updates - Database refreshed daily with the latest F1 statistics
- β‘ High Performance - Built on modern Node.js with TypeScript and Prisma v7 ORM (Direct TCP)
- π§© Rich Query Options - Filter, paginate, and explore F1 data with flexible queries
- Node.js (v22.12+ or v24.0+)
- Yarn package manager
- MariaDB/MySQL database
- Lando
# Clone the repository
git clone git@github.com:FrancoStino/F1-GraphQL.git
# Navigate to the project directory
cd F1-GraphQL
# Configure your environment
cp .env.example .env
# Edit .env with your database connection string
# Start Lando
lando start
# Import from ZIP archive
lando db-import db/f1db-sql-mysql-single-inserts.zip
# Install dependencies
yarn install
# Generate Prisma client (v7 with Direct TCP)
yarn generate
# Start development server
yarn devlando db-exportOnce running, access your GraphQL API through:
| Endpoint | URL | Description |
|---|---|---|
| π Landing Page | http://localhost:4000/ |
Main welcome page with links |
| π§ͺ GraphQL Yoga | http://localhost:4000/graphql |
GraphiQL interface for testing |
| π Apollo Server | http://localhost:4000/apollo |
Apollo Sandbox environment |
query Drivers {
findManyDriver(take: 10) {
id
firstName
lastName
name
fullName
gender
dateOfBirth
}
}query Race {
findManyRace(take: 50) {
year
turns
laps
}
}π Updated to Prisma v7 with Direct TCP connectivity for optimal performance
|
GQLoom |
TypeScript |
GraphQL |
Prisma v7 |
Apollo |
Yoga |
Lando |
f1-graphql/
βββ .github/ # GitHub Actions workflows for CI/CD
βββ assets/ # Static assets (images, CSS)
βββ prisma/ # Database schema and generated client
βββ src/
β βββ providers/ # Database client provider
β βββ resolvers/ # GraphQL resolvers configuration
β βββ schema/ # GraphQL schema generation
β βββ servers/ # Server configurations
β β βββ ApolloServer.ts
β β βββ Express.ts
β β βββ GraphQL-Yoga.ts
β β βββ LandingPage.ts
β βββ utils/ # Utility functions
β βββ index.ts # Main entry point
This project uses GitHub Actions for:
- Daily Data Updates: Automatically refreshes the F1 database
- Release Management: Generates changelogs and tags
- Branch Syncing: Keeps development branches in sync
This project is licensed under the MIT License.
Davide Ladisa
ποΈ Ready to race with F1 data? Star this repo and buckle up! π
