Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
request: {
payload: { mutation, variables, context },
},
} = offlineRecord;
const query = client.queryManager.transform(mutation).document;
const operation = {
query,
variables,
operationName: getOperationName(query) || void 0,
context: client.queryManager.prepareContext({
...context,
forceFetch: true,
}),
};
const options: Options = {
observable: multiplex(execute(link, operation)) as any,
};
return observableToPromise(options, (result) => result);
}