@apollo/utils.sortast
Sort AST nodes in a document alphabetically
Last updated 5 years ago by apollo-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @apollo/utils.sortast 
SYNC missed versions from official npm registry.

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 }

Current Tags

  • 3.1.0                                ...           latest (21 days ago)

6 Versions

  • 3.1.0                                ...           21 days ago
  • 3.0.0                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 17
Today 1
This Week 1
This Month 11
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE