How to know if the cache merge incoming is from server

Hey guys! My team is building an offline app. The local changes are stored using the cache and later synced with server if the order is finished. When the internet is back the server incoming data replaces the cache, but if the order is not finished yet we should be able to keep that cache state. So, is it possible to know if the incoming is from server or local? Here’s my code: (isOffline field is a boolean to check if the order was started offline, isSynced is a boolean to check is it is already synced, if so I could just use server incoming).

getOrderService: {
          merge(existing, incoming, {readField, variables}) {
            if (!existing || !variables) return incoming;
            const isOffline = readField('isOffline', existing);
            const isSynced = readField('isSynced', existing);

            const isServerIncoming = false;

            if (isServerIncoming && isOffline && !isSynced) {
              // KEEP EXISTING STATE IF MADE OFFLINE BUT NOT SYNCED
              return existing;
            }
            return incoming;
          },
}