Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async subscribe({
fetchPolicy = this.fetchPolicy,
query = this.subscription,
variables = this.variables,
} = {}) {
if (!hasAllVariables({ query, variables })) return;
this.observable = this.client.subscribe(
stripUndefinedValues({ query, variables, fetchPolicy })
);
return this.observable.subscribe({
next: this.nextData,
error: this.nextError,
});
}