- Merge release

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-09 13:21:09 -05:00
parent c1a97c44a0
commit 653f6e0ebb
2 changed files with 30 additions and 10 deletions

View File

@@ -1,7 +1,24 @@
import {Kind, visit} from "graphql";
import {Kind, visit, parse, print} from "graphql";
/* eslint-disable no-loop-func */
/**
* Parse a GraphQL query into an AST
* @param query
* @returns {DocumentNode}
*/
export function parseQuery(query) {
return parse(query);
}
/**
* Print an AST back into a GraphQL query
* @param query
* @returns {string}
*/
export function printQuery(query) {
return print(query);
}
/**
* Apply sorters to the AST
* @param ast