Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const queryNameFromQueryString = (queryString) => {
const doc = parse(queryString);
const queryDefinition = getQueryDefinition(doc);
if (queryDefinition.name && queryDefinition.name.value) {
return queryDefinition.name.value;
}
return null;
};