github gofr-dev/gofr v1.55.0

4 hours ago

Release v1.55.0

🚀 Features

Native GraphQL Support

GoFr now provides first-class GraphQL support using a schema-first approach. Define your API contract in ./configs/schema.graphqls, register resolvers with app.GraphQLQuery() and app.GraphQLMutation(), and GoFr handles execution, validation, tracing, and metrics automatically.

  • Single Endpoint: All operations served at POST /graphql
  • Interactive Playground: Auto-hosted at /.well-known/graphql/ui
  • Full Observability: Per-resolver OpenTelemetry tracing, operation-level metrics (app_graphql_operations_total, app_graphql_error_total, app_graphql_request_duration), and structured logs aligned with GoFr's existing format
  • Operation Name Extraction: Automatically parses resolver names from the query AST for meaningful metric labels, even for anonymous operations
  • Grafana Dashboard: GraphQL panels added to the standard GoFr dashboard with Response Time SLA, Request/Error Count, and Latency breakdowns by operation and type

gRPC Rate Limiter

Built-in rate limiter interceptors for gRPC using a token bucket algorithm, supporting both unary and streaming RPCs.

  • Per-IP Rate Limiting: Each client IP gets its own rate limit bucket
  • Shared or Separate Budgets: Use a single store for combined limits or independent configs per call type
  • Prometheus Metrics: Track violations via app_grpc_rate_limit_exceeded_total counter
  • Returns RESOURCE_EXHAUSTED with retry-after metadata on limit exceeded

GCS Metadata Upload and Signed URL Generation

Google Cloud Storage now supports cloud-specific operations beyond the standard filesystem interface.

  • CreateWithOptions: Upload files with custom Content-Type, Content-Disposition, and arbitrary metadata
  • GenerateSignedURL: Create time-limited, pre-authenticated download URLs
  • file.AsCloud(): Safe type assertion helper to check cloud support

🔧 Enhancements

NATS OpenTelemetry Span Links

Added span link support for NATS JetStream PubSub operations, providing distributed tracing visibility into publish, subscribe, and commit operations.

gRPC Observability Improvements

Client-side errors (e.g., InvalidArgument, NotFound, ResourceExhausted) are no longer logged at ERROR level — only server-side errors are. This reduces log noise in production.

🛠️ Fixes

  • Migration Race Condition — Fixed a race condition where multiple pods starting simultaneously could execute the same migration concurrently. The migration state is now re-verified under the distributed lock before execution, preventing duplicate runs in multi-instance deployments.

  • Zipkin Deprecation WarningTRACE_EXPORTER=zipkin now logs an actionable deprecation warning with migration instructions to OTLP (Zipkin supports OTLP natively since v2.24+).

  • CI Workflow Updates — Bumped Docker GitHub Actions (setup-buildx-action, login-action) from v3 to v4 in website deployment workflows.

Don't miss a new gofr release

NewReleases is sending notifications on new releases.