1.0.3 • Published 4 years ago
graphql-sort-schema-root-fields v1.0.3
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'));