Skip to main content

Module doctor

Module doctor 

Source
Expand description

Doctor command — systematic diagnostic checks for common FraiseQL setup problems.

Usage: fraiseql doctor fraiseql doctor –config fraiseql.toml –schema schema.compiled.json fraiseql doctor –json

Structs§

DoctorCheck
A single diagnostic check result.

Enums§

CheckStatus
Outcome of a single diagnostic check.

Functions§

check_database_url_set
Check whether DATABASE_URL is set in the environment.
check_db_reachable
Attempt a TCP connection to the database host:port extracted from the URL.
check_jwt_secret
Check whether FRAISEQL_JWT_SECRET is set.
check_redis_reachable
Check Redis if REDIS_URL is set.
check_rls_cache_coherence
Cross-check: warn if caching is enabled without any authorization policy.
check_schema_exists
Check that the compiled schema file exists and is readable.
check_schema_parses
Check that the compiled schema file is valid JSON.
check_schema_version
Check the schema format version field.
check_tls
Check TLS: if the TOML config enables TLS, the cert file must exist.
check_toml_exists
Check whether fraiseql.toml exists.
check_toml_parses
Parse fraiseql.toml. Only called when the file actually exists.
print_json_report
Print the doctor report as JSON to stdout.
print_text_report
Print the doctor report in text format to stdout.
run
Execute the doctor command.
run_checks
Run all doctor checks and return the list of results.