Mercurius Logging
JSON →Fastify plugin that adds detailed GraphQL request logging to mercurius-based applications. Current stable version is 2.0.0, released 2024, compatible with Fastify v5. The plugin automatically logs GraphQL query names, mutation names, operation name, request body, and variables into structured JSON logs, addressing the default Fastify behavior that only logs a generic /graphql URL. Key differentiators: zero-config setup (plugin auto-detects GraphQL operations), optional fields for body/variables/alias, custom log levels, and use of request-scoped logger for correlation with request IDs. Ships TypeScript types.
Resources
packagemercurius-logging ↗
API endpoints
full doc /v1/registry/mercurius-logging