How to use the ember-apollo-client/-private/deprecate-computed function in ember-apollo-client

To help you get started, we’ve selected a few ember-apollo-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ember-graphql / ember-apollo-client / addon / services / apollo.js View on Github external
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();
    }
  }
github ember-graphql / ember-apollo-client / addon / services / apollo.js View on Github external
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 };
  }
github ember-graphql / ember-apollo-client / addon / services / apollo.js View on Github external
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 };
  }

ember-apollo-client

An ember-cli addon for the Apollo GraphQL Client.

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis