Graph Pruning - WunderGraph

Graph Pruning Lint Rules Overview

Rules

  1. UNUSED_FIELDS
    • Identifies and lists all fields that are not being used in the schema.
  2. DEPRECATED_FIELDS
    • Detects fields that have been deprecated but have not yet been removed from the schema.
  3. REQUIRE_DEPRECATION_BEFORE_DELETION
    • Identifies fields that were deleted without being marked as deprecated beforehand.

Rule Configurations

Severity Level

Grace Period

This is the time period provided to the fields modified on schema publications, allowing time before enforcing these rules during checks.

Schema Usage Check Period (Enterprise only)

How to configure graph pruning linter

  1. Navigate to the Lint Policy page on Cosmo.
  2. Select the namespace.
  3. Enable the graph pruning linter.
  4. Configure the linter rules:
    • Check the checkbox to enable each rule.
    • Select the severity level (Warning or Error) for each rule.
    • Set the grace period for fields that are modified upon schema publication, allowing time before enforcing these rules during checks.
    • Configure the schema usage check period (available only for enterprise customers).