itcast 6e512b8ce6 aaaa 10 mesiacov pred
..
dist 6e512b8ce6 aaaa 10 mesiacov pred
src 6e512b8ce6 aaaa 10 mesiacov pred
LICENSE 6e512b8ce6 aaaa 10 mesiacov pred
README.md 6e512b8ce6 aaaa 10 mesiacov pred
package.json 6e512b8ce6 aaaa 10 mesiacov pred

README.md

sortAST

The sortAST function is used to alphabetically sort all of the nodes in a graphql DocumentNode.

Usage

import { sortAST } from "@apollo/utils.sortast";

const sortedAST = sortAST(
  parse(`#graphql
  query Foo { c b a }
`),
);

print(sortedAST);
// query Foo { a b c }