|
4 months ago | |
---|---|---|
.. | ||
dist | 4 months ago | |
src | 4 months ago | |
LICENSE | 4 months ago | |
README.md | 4 months ago | |
package.json | 4 months ago |
The sortAST
function is used to alphabetically sort all of the nodes in a graphql DocumentNode
.
import { sortAST } from "@apollo/utils.sortast";
const sortedAST = sortAST(
parse(`#graphql
query Foo { c b a }
`),
);
print(sortedAST);
// query Foo { a b c }