Skip to content

Commit

Permalink
BC checker: sort GraphQL schema lexicographically
Browse files Browse the repository at this point in the history
Not really a BC break but it could surprise some users so I am bumping the version and adding info to the CHANGELOG as well.

kiwicom-source-id: 3c136da03e04151b56fdf100a0e33983112e6e72
  • Loading branch information
Martin Zlámal authored and kiwicom-github-bot committed Apr 8, 2019
1 parent 0b753c1 commit 9cc582a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/packages/bc-checker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Unreleased

# 1.2.0
- GraphQL schema is now sorted lexicographically

# 1.1.0
- Output messages are now more helpful and tested
2 changes: 1 addition & 1 deletion src/packages/bc-checker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Script to detect breaking changes in GraphQL schema with ability to log these changes.",
"homepage": "https://github.com/kiwicom/graphql-bc-checker",
"private": false,
"version": "1.1.2",
"version": "1.2.0",
"main": "src/index.js",
"dependencies": {
"@kiwicom/signed-source": "^1",
Expand Down
3 changes: 2 additions & 1 deletion src/packages/bc-checker/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
findBreakingChanges,
buildSchema,
printSchema,
lexicographicSortSchema,
type GraphQLSchema,
} from 'graphql';
import SignedSource from '@kiwicom/signed-source';
Expand All @@ -26,7 +27,7 @@ const createSnapshot = (breakingChangesBlock, newSchema) => {
breakingChangesBlock +
os.EOL +
os.EOL +
printSchema(newSchema),
printSchema(lexicographicSortSchema(newSchema)),
);
};

Expand Down

0 comments on commit 9cc582a

Please sign in to comment.