graphql-sort-schema-root-fields
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

graphql-sort-schema-root-fields

While the graphql lexicographicSortSchema utility will sort your full schema, graphql-sort-schema-root-fields is useful if you only want to sort the direct fields of the query, mutation, and subscription types.

Example

...
 
const sortSchemaRootFields = require('graphql-sort-schema-root-fields');
 
const server = new GraphQLServer({
  schema: sortSchemaRootFields(schema)
});
 
server.start(() => console.log('Server is running on localhost:4000'));
 

Readme

Keywords

none

Package Sidebar

Install

npm i graphql-sort-schema-root-fields

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

2.6 kB

Total Files

4

Last publish

Collaborators

  • bconnorwhite