How to use the graphql-tag/loader.call function in graphql-tag

To help you get started, we’ve selected a few graphql-tag 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 partyparrot / codetours / .storybook / jestGraphql.js View on Github external
process(src) {
    // call directly the webpack loader with a mocked context
    // as graphql-tag/loader leverages `this.cacheable()`
    return loader.call({ cacheable() {} }, src);
  },
};
github remind101 / jest-transform-graphql / index.js View on Github external
process(src) {
    // call directly the webpack loader with a mocked context 
    // as graphql-tag/loader leverages `this.cacheable()`
    return loader.call({ cacheable() {} }, src);
  },
};
github sebastian-software / edge / packages / jest-preset-edge / transform / graphql.js View on Github external
process(source) {
    return loader.call({
      cacheable() {
        // empty
      }
    }, source)
  }
}
github bvaughn / react-window / website / config / jest / graphqlTransform.js View on Github external
process(src) {
    return loader.call({ cacheable() {} }, src);
  },
};
github joshwcomeau / guppy / config / jest / graphqlTransform.js View on Github external
process(src: any) {
    return loader.call({ cacheable() {} }, src);
  },
};
github Swydo / meteor-graphql / compiler.js View on Github external
.forEach((file) => {
        const path = `${file.getPathInPackage()}.js`;
        const content = file.getContentsAsString().trim();

        try {
          const data = loader.call(context, content);

          file.addJavaScript({
            data,
            path,
          });
        } catch (e) {
          if (e.locations) {
            file.error({
              message: e.message,
              line: e.locations[0].line,
              column: e.locations[0].column,
            });
          } else {
            throw e;
          }
        }

graphql-tag

A JavaScript template literal tag that parses GraphQL queries

MIT
Latest version published 3 years ago

Package Health Score

85 / 100
Full package analysis

Similar packages