This is PR 6 out of 7 planned PRs for the performance tracking feature. A significant amount of infrastructure work has already been completed in previous PRs:
- ✅ Performance tracking infrastructure (
PerformanceTracker,withQueryMetrics,executeWithMetrics) - ✅ Redis cache service implementation (
RedisCacheService) - ✅ Fastify performance plugin integration
- ✅ Server-Timing headers and
/metrics/perfendpoint
Actually, 54 query files are modified in this PR. However, only 3 files are currently using the standardized executeWithMetrics helper:
src/graphql/types/Query/user.tssrc/graphql/types/Query/event.tssrc/graphql/types/Query/organizations.ts
The other query files (like organization.ts) are using the manual ctx.perf?.time() pattern. This PR focuses on adding performance tracking instrumentation to query resolvers, and the standardized helper was introduced to ensure consistency.
Note: The PR shows 4138 files changed because it was merged with develop, which includes many unrelated changes from other contributors.
Could you please clarify which specific files the issue mentions? This will help ensure we're addressing the correct scope for PR 6c.
Based on the commit message, this PR was intended to:
- Add performance tracking to query resolvers using
withQueryMetrics/executeWithMetrics - Update
user.ts,event.ts, andorganizations.tsto use the standardized helper - Add comprehensive test coverage
The Redis dependency is already complete from previous PRs:
RedisCacheServiceis fully implemented with all required methods (get,set,del,clearByPattern,mget,mset)- Redis integration is working via
@fastify/redisplugin - Cache service is registered in
src/fastifyPlugins/cacheService.ts - Graceful degradation is implemented (noop cache if Redis unavailable)
The Redis implementation was completed in earlier PRs as part of the infrastructure setup, so PR 6c can proceed with adding query performance tracking.
Files using standardized helper (executeWithMetrics):
- ✅
src/graphql/types/Query/user.ts - ✅
src/graphql/types/Query/event.ts - ✅
src/graphql/types/Query/organizations.ts
Files using manual pattern (should be updated?):
src/graphql/types/Query/organization.ts(usesctx.perf?.time()directly)
- Please clarify which files the issue specifically mentions for PR 6c
- Should we update
organization.tsto useexecuteWithMetricsfor consistency? - Are there other query files that should be updated in this PR?
Thank you for the review!