How to use the react-orbitjs.recordIdentityFrom function in react-orbitjs

To help you get started, we’ve selected a few react-orbitjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sillsdev / appbuilder-portal / source / SIL.AppBuilder.Portal.Frontend / src / data / orbitjs-operations-support / serialize-from-api.ts View on Github external
removedRecords.forEach((record) => {
            let recordIdentity = recordIdentityFrom(
              store,
              record.id,
              toOrbitType(store, record.type)
            );
            // was this record already removed from the cache?
            // maybe we are receiving an operations payload that is telling us
            // to remove something that we've already removed.
            let exists = false;

            try {
              exists = store.cache.query((q) => q.findRecord(recordIdentity));
            } catch (e) {
              // don't care if this throws an exception;
            }

            if (exists) {