How to use the @apollo-elements/lib/helpers.js.stripUndefinedValues function in @apollo-elements/lib

To help you get started, weโ€™ve selected a few @apollo-elements/lib 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 apollo-elements / apollo-elements / packages / mixins / apollo-subscription-mixin.js View on Github external
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,
      });
    }