import { commitLocalUpdate , Environment , RecordSourceProxy , } from "relay-runtime" ; export default function commitLocalUpdatePromisified ( environment , updater ) { return new Promise ( ( resolve , reject ) => { commitLocalUpdate ( environment , ( store ) => { updater ( store ) . then ( ( ) => resolve ( ) ) . catch ( ( err ) => reject ( err ) ) ; } ) ; } ) ; }