How to use the graphql-tag/parser.parse 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 apollographql / apollo-client-devtools / app / components / WatchedQueries.js View on Github external
const queryNameFromQueryString = (queryString) => {
  const doc = parse(queryString);
  const queryDefinition = getQueryDefinition(doc);
  if (queryDefinition.name && queryDefinition.name.value) {
    return queryDefinition.name.value;
  }
  return null;
};

graphql-tag

A JavaScript template literal tag that parses GraphQL queries

MIT
Latest version published 2 years ago

Package Health Score

86 / 100
Full package analysis

Similar packages