Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
chain.get(key).on(updater, true);
});
return t;
} else {
ref[key] = ref[key] || {};
return {
chain: chain.get(key),
subscribe,
path: [...path, key],
ref: ref[key]
};
}
};
const graphqlOut = graphql(
resolver,
query,
{ path: [], ref: resultValue, chain: gun },
null,
null,
{
deferrableOrImmediate,
arrayOrDeferrable
}
);
const thunk = thunkish(function(triggerUpdate) {
triggerUpdate(resultValue);
if (graphqlOut.isThunk) {
graphqlOut(function(actualRes) {
triggerUpdate(resultValue); // TODO: Figure out how to use actualRes instead of tracking resultValue
});