Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

🎯 Summary

This PR implements the first version of GraphQL comparison between PostgreSQL+Hasura and Doublets+GQL, as requested in issue #1.

πŸ“‹ Implementation Details

βœ… Core Components

  • GraphQL Schema: Common schema defining all benchmark operations (Create, Update, Delete, Read variants)
  • PostgreSQL + Hasura Setup: Docker Compose with database initialization and Hasura metadata
  • Doublets GraphQL Setup: Docker configuration for Data.Doublets.Gql server
  • k6 Load Testing: Comprehensive benchmark scripts using k6 for both GraphQL endpoints
  • Results Processing: Python script for visualization and comparison (similar to existing benchmarks)
  • GitHub Actions: Automated workflow for continuous benchmarking

πŸ”„ GraphQL Operations Benchmarked

Based on the existing benchmark operations, implements GraphQL equivalents:

Mutations (Write Operations):

  • createPointLink - Creates point links (id = source = target)
  • createLink - Creates regular links
  • updateLink - Updates existing links
  • deleteLink - Deletes links by ID

Queries (Read Operations):

  • allLinks - Get all links ([*, *, *] constraint)
  • linkById - Get by ID ([id, *, *] constraint)
  • concreteLinks - Get by source+target ([*, source, target] constraint)
  • outgoingLinks - Get outgoing ([*, source, *] constraint)
  • incomingLinks - Get incoming ([*, *, target] constraint)

πŸš€ Usage

Local Development:

./run-benchmarks.sh

GitHub Actions:
Automatically runs on push/PR and publishes results to gh-pages branch.

πŸ“Š Results

The implementation generates:

  • Performance comparison charts (linear and log scale)
  • Tabular results with speedup factors
  • Integration with existing benchmark visualization pipeline

πŸ”§ Technical Details

  • Uses k6 for GraphQL load testing (solving the graphql-bench issues mentioned)
  • Maintains same testing conditions as existing benchmarks (3000 background links)
  • Docker-based setup for reproducible environments
  • Follows existing project patterns and conventions

🎁 Closes

Fixes #1


πŸ€– Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #1
@konard konard self-assigned this Sep 13, 2025
- Add comprehensive GraphQL schema covering all benchmark operations
- Set up PostgreSQL+Hasura with Docker Compose and metadata configuration
- Set up Doublets GraphQL server with Docker setup
- Implement k6 load testing scripts for both GraphQL endpoints
- Add visualization and results processing similar to existing benchmarks
- Create GitHub Actions workflow for automated benchmarking
- Add local benchmark runner script for development
- Update README with GraphQL benchmark results section

Addresses issue #1 for GraphQL-based performance comparison.

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Implement first version of the comparison via GQL Implement GraphQL comparison: PostgreSQL+Hasura vs Doublets+GQL Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement first version of the comparison via GQL

2 participants