Skip to main content
GraphCheck suites are YAML files under checks/ (or wherever graphcheck.yml’s checks path points). A suite groups checks into three kinds — conformance, competency, and drift — plus a shared defaults block for severity and tags. Examples below are drawn from the fraud-ring fixture (graphcheck-fraud-ring-fixture) where a real, planted scenario exists; a few core checks the fixture doesn’t exercise use generic illustrative data instead.

Conformance checks

Conformance checks assert a structural rule against the graph using a built-in template. The check field selects the template; with supplies its parameters. hub_outlier is sampled and supports an optional sample_size; every other core check is unsampled and requires only read access, except dangling_rels, which additionally requires the store_consistency connector probe.

No orphans and cardinality — fraud-ring fixture

The fixture plants 3 orphan accounts and 1 cardinality violation (an account with two owners):

Completeness — fraud-ring fixture

Every base Customer carries tax_id, email, and national_id:

Hub outlier — fraud-ring fixture

The fixture’s Transaction nodes have a real degree distribution suited to hub-outlier detection:

Checks without a fixture example

The fraud-ring fixture doesn’t plant scenarios for dangling_rels, property_type, property_format, value_in_set, uniqueness, label_cooccurrence, rel_direction, or temporal_sanity. Each takes its own with parameters; validation rejects an invalid combination with an error naming the offending field, so the fastest way to explore a check’s parameters is to write it and run graphcheck run — nothing executes until the suite validates. A generic example:

Competency checks

Competency checks run a Cypher query against the graph and assert the shape of its result — for questions the graph should be able to answer, rather than structural rules.

Drift checks

Drift checks compare a metric against a previously captured baseline and flag deviation beyond a configured tolerance. The fraud-ring fixture’s seed-drifted.cypher represents a documented 12% Customer-count reduction (1,500 to 1,320) from the baseline:

PII pack

The PII pack is a separate, executable heuristic pack. Findings are sampled and heuristic — this pack never claims complete PII discovery. The fraud-ring fixture plants a name-alias field (email) and value-pattern-matchable data on national_id (Singapore NRIC-style and Indian Aadhaar-style, alternating per customer) — note that national_id itself is not a recognized name alias, so it is only caught by pii_value_match, not pii_name_match. Both checks accept an optional label and sample_size, plus an optional patterns list to restrict which aliases or formats are checked; pii_value_match also accepts an optional properties list to restrict which property keys are scanned. Example — scanning the fraud-ring fixture’s Customer nodes:

Severity and defaults

defaults.severity sets the suite-wide severity (error or warn); individual checks can override it. Suite-wide tags let you select subsets of checks at run time with graphcheck run --select tag:<name>. The check YAML contract is strict: duplicate keys, unknown fields, unknown check names, and invalid with parameters are rejected with loud validation errors rather than silently ignored. Built-in packs are data, not code — every pack’s metadata and parameters are validated against the same contract before any check runs.