How to use the graphql-config-utilities.getGraphQLProjectIncludedFilePaths function in graphql-config-utilities

To help you get started, we’ve selected a few graphql-config-utilities 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 Shopify / graphql-tools-web / packages / graphql-validate-fixtures / src / index.ts View on Github external
async function getOperationsForProject(
  projectConfig: GraphQLProjectConfig,
): Promise {
  const operationPaths = await getGraphQLProjectIncludedFilePaths(
    projectConfig,
  );

  const operationSources = await Promise.all(
    operationPaths.map(loadOperationSource),
  );

  const document = concatAST(
    operationSources.map((source) => {
      try {
        return parse(source);
      } catch (error) {
        throw new Error(
          `Error parsing '${source.name}':\n\n${error.message.replace(
            /Syntax Error.*?\(.*?\) /,
            '',

graphql-config-utilities

Common utilities for graphql-config

MIT
Latest version published 5 months ago

Package Health Score

56 / 100
Full package analysis

Similar packages