How to use the @apollo-elements/lib.isValidGql 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 / hybrids / factories / document.js View on Github external
const set = (host, next) => {
    if (!next) return doc || null;
    if (!isValidGql(next)) throw new Error(errorMessage);
    if (onSet && typeof onSet === 'function') onSet(next);
    return next;
  };