Skip to content

Conversation

@productdevbook
Copy link
Owner

Summary

  • Adds support for .gql file extension alongside .graphql for schema and document scanning
  • Updates GRAPHQL_GLOB_PATTERN constant from **/*.graphql to **/*.{graphql,gql}
  • Adds comprehensive tests for the new functionality

Closes #44

Changes

File Change
src/core/constants.ts Updated GRAPHQL_GLOB_PATTERN to include .gql
src/core/scanning/schemas.ts Updated JSDoc comment
src/core/scanning/documents.ts Updated JSDoc comment
tests/unit/constants.test.ts Added test for glob pattern
tests/unit/scanning/schemas.test.ts Added tests for .gql scanning
tests/unit/scanning/documents.test.ts Added tests for .gql scanning

Test plan

  • Build passes (pnpm build)
  • Type check passes (pnpm test:types)
  • All 694 tests pass (pnpm test:run)

🤖 Generated with Claude Code

Closes #44

Previously, only .graphql files were scanned for schemas and documents.
This change updates GRAPHQL_GLOB_PATTERN to support both .graphql and .gql
extensions, allowing developers to use common GraphQL ecosystem conventions
(e.g., .graphql for schemas, .gql for operations).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 62.5% 852 / 1363
🔵 Statements 62.67% 873 / 1393
🔵 Functions 65.67% 155 / 236
🔵 Branches 51.36% 509 / 991
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/core/constants.ts 100% 100% 100% 100%
src/core/scanning/documents.ts 100% 88.88% 100% 100%
src/core/scanning/schemas.ts 100% 100% 100% 100%
Generated in workflow #307 for commit 798b977 by the Vitest Coverage Report Action

@productdevbook productdevbook merged commit 0a13e1a into main Jan 7, 2026
1 check passed
@productdevbook productdevbook deleted the feat/gql-extension-support branch January 7, 2026 13:56
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.

Support .gql file extension for GraphQL documents

2 participants