pub fn validate_graph(source: &str) -> Result<JsValue, JsValue>
Validate a reference graph and return any errors/warnings.