Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
super.init(...arguments);
let options = this.clientOptions;
if (typeof options === 'function') {
options = this.clientOptions();
} else {
deprecateComputed('clientOptions');
}
this.client = new ApolloClient(options);
if (Ember.testing) {
this._registerWaiter();
}
}
clientOptions() {
let { link, cache } = this;
if (typeof link === 'function') {
link = this.link();
} else {
deprecateComputed('link');
}
if (typeof cache === 'function') {
cache = this.cache();
} else {
deprecateComputed('cache');
}
return { link, cache };
}
clientOptions() {
let { link, cache } = this;
if (typeof link === 'function') {
link = this.link();
} else {
deprecateComputed('link');
}
if (typeof cache === 'function') {
cache = this.cache();
} else {
deprecateComputed('cache');
}
return { link, cache };
}