diff --git a/internal/graph/schema.resolvers.go b/internal/graph/schema.resolvers.go index bde7013e..14f71e15 100644 --- a/internal/graph/schema.resolvers.go +++ b/internal/graph/schema.resolvers.go @@ -268,9 +268,15 @@ func (r *queryResolver) Job(ctx context.Context, id string) (*schema.Job, error) // JobMetrics is the resolver for the jobMetrics field. func (r *queryResolver) JobMetrics(ctx context.Context, id string, metrics []string, scopes []schema.MetricScope, resolution *int) ([]*model.JobMetricWithName, error) { - if resolution == nil && config.Keys.EnableResampling != nil { - defaultRes := slices.Max(config.Keys.EnableResampling.Resolutions) - resolution = &defaultRes + + if resolution == nil { // Load from Config + if config.Keys.EnableResampling != nil { + defaultRes := slices.Max(config.Keys.EnableResampling.Resolutions) + resolution = &defaultRes + } else { // Set 0 (Loads configured metric timestep) + defaultRes := 0 + resolution = &defaultRes + } } job, err := r.Query().Job(ctx, id)