How to use the @graffy/common.decorateQuery function in @graffy/common

To help you get started, we’ve selected a few @graffy/common 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 usegraffy / graffy / src / core / Graffy.js View on Github external
this.on('read', path, async function porcelainRead(query, options) {
      return makeFinalGraph(await handle(decorateQuery(query), options), query);
    });
  }
github usegraffy / graffy / src / core / Graffy.js View on Github external
this.on('watch', path, async function* porcelainWatch(query, options) {
      const subscription = handle(decorateQuery(query), options);
      let firstValue = (await subscription.next()).value;
      yield firstValue && makeFinalGraph(firstValue, query);
      for await (const value of subscription) {
        yield value && makeGraph(value);
      }
    });
  }