patches.js: ...
patches.js: fix type errors in graph constructor