Modernize to 2025 standards with TDD, comprehensive testing, and antcolony conventions#24
Merged
Modernize to 2025 standards with TDD, comprehensive testing, and antcolony conventions#24
Conversation
…onventions ## Breaking Changes - **BREAKING**: Convert all API parameters to snake_case (build_context, root_value, format_error, operation_name, variable_values) - Adapters now accept both camelCase and snake_case for backward compatibility ## Dependencies - Update graphql 16.6.0 → 16.12.0 - Update all dev dependencies to latest (ESLint 9, Prettier 3.6, Husky 9, etc.) - Remove Babel dependencies (no longer needed with modern Node.js) - Add Pino 10.1.0 for structured logging - Add c8 10.1.3 for coverage reporting - Add TypeScript 5.9.3 for type checking ## Testing Infrastructure - Migrate to Node.js built-in test runner (from tap) - Add comprehensive test suite for all adapters (Koa, Fastify, Lambda, TinyHttp) - Add error path and edge case coverage - Configure c8 with 75% line/statement, 70% branch/function thresholds - 28 tests passing, 85.56% coverage achieved ## Code Quality - Migrate to ESLint 9 flat config (eslint.config.js) - Remove deprecated @babel/eslint-parser - Enforce modern JavaScript patterns (no-var, prefer-const, prefer-spread) - Add Pino logger configuration for structured logging - Fix security vulnerability (brace-expansion) ## New Tests - test/fastify.test.js - Fastify adapter tests (variables, errors, validation) - test/lambda.test.js - Lambda adapter tests (including named operations) - test/tinyhttp.test.js - TinyHttp adapter tests (complete coverage) - Enhanced test/index.test.js - Koa tests with error paths ## Improvements - Add typecheck script (tsc --noEmit) - Update npm scripts (test:coverage, typecheck) - Add coverage/ to .gitignore - Fix getOperationAST destructuring bug (operation_ast.operation) - Support both camelCase and snake_case in request bodies (backward compat) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete modernization of @hydre/graphql-http to 2025 standards with test-driven development, comprehensive coverage, and antcolony backend conventions.
Key Improvements
✅ Testing Infrastructure
node:test)✅ Dependencies Updated
✅ Code Quality & Standards
✅ Security
Breaking Changes
Backward Compatibility: All adapters accept both camelCase and snake_case in request bodies (
operationName/operation_name,variablesworks for both).Test Coverage
Test Plan
🤖 Generated with Claude Code