- Fix a bug that prevented ignoring errors (
--ignore ...
) that originated from custom rules. #267 (Thanks @steverice)
interface-fields-sorted-alphabetically
has been added to validate that interface fields are sorted alphabetically. #260 (Thanks @hipper)
- Rules that previously verified that elements were sorted alphabetically can now be configured to check for lexicographical sort order. This is useful for folks using schema stitching and sorting their schema at runtime using graphql-js'
lexicographicSortSchema
. The sort order can be configured per-rule using the newrulesOptions
(--rule-options
) feature and specifying a differentsortOrder
. When unspecified,sortOrder
will default to the existing behaviour:alphabetical
. #256 (Thanks @dustinsgoodman)
- Fix a race condition where writing to stdout on certain platforms / streams would lead to partial results or corrupted JSON. #262 (Thanks @steverice)
- Fix a bug that would cause
graphql-schema-linter
to crash when configured viapackage.json
andignore
config was not set. #253 (Thanks @paramjitkaur)
graphql-schema-linter
has been in development since August 2017. During that time, 18 people have contributed 131 pull requests that make up the tool that we have today. 🎉
I believe the tool is now stable and can follow semantic versioning.
On that note, the addition or modification of existing rules will be considered a breaking change and thus will require bumping the MAJOR version of the library. By doing this, users of graphql-schema-linter
won't get caught off guard by those changes.
- Add support for enabling / disabling rules for parts of the GraphQL schema using the
--ignore
option. This works functionally the same way as inline rule overrides, but is meant to be used when adding comments to the GraphQL schema is not possible. #240 (Thanks @id-ilych)
- Add support for enabling / disabling rules for parts of the GraphQL schema using an inline rule override. See usage information in README.md. #237 (Thanks @mshwery)
- Support for comment descriptions were mistakenly dropped in
v0.3.0
. They were re-added in this version. #230
- Support for comment descriptions has been dropped in favor of descriptions defined using strings. #229
- Bumped GraphQL dependency to v15.
- Fix an issue with
--stdin
not working correctly in some cases. #223 (Thanks @dnerdy)
- Add
arguments-have-descriptions
rule. This rule will validate that all field arguments have a description. #219 (Thanks @aldeed) - Add
descriptions-are-capitalized
rule. This rule will validate that all descriptions, if present, start with a capital letter. #219 (Thanks @aldeed) - Add
input-object-fields-sorted-alphabetically
rule. This rule will validate that all input object fields are sorted alphabetically. #219 (Thanks @aldeed) - Add
type-fields-sorted-alphabetically
rule. This rule will validate that all type object fields are sorted alphabetically. #219 (Thanks @aldeed)
- Add a third output format named
compact
that can be used in conjunction with programs likegrep
. See README.md for sample output. #209 (Thanks @MatthewRines)
- Allow
first
argument to be a non-nullable integer when connection only supports forward pagination. #203 (Thanks @swac) - Allow
last
argument to be a non-nullable integer when connection only supports backward pagination. #203 (Thanks @swac)
- Add support for
schemaPaths
to be configured viapackage.json
. See README.md for examples. #196 (Thanks @gagoar)
- Gracefully handle validating schemas that are missing a query root. #189
- Catch invalid
--custom-rule-paths
and report them as errors instead of crashing. #181 (Thanks @jizhang27)
- Add built-in validation for invalid GraphQL schema definitions. Rather than assume GraphQL schemas are valid and crash when they are not,
graphql-schema-linter
will report these errors. #163
- Fixed an issue that caused certain rules to run twice. #133
- Add
--old-implements-syntax
option to support the old SDL syntax forimplements
. #124. (Thanks @ruiaraujo for initial report.)
- The
fields-are-camel-cased
andinput-object-values-are-camel-cased
rules now allow consecutive capital letters. #121 (Thanks @gracenoah)
- Allow non-null list for
edges
field. #112
- Removed dependency on
graphql-config
until it is actually used.
Descriptions must now be defined as strings instead of comments as outlined in the spec.
In order to provide a graceful upgrade path, users can use the --comment-descriptions
option to use the old way of defining descriptions.
More information available in #95.
defined-types-are-used
should not report errors forMutation
as that the naming convention for a schema's mutation root. #94defined-types-are-used
should not report unreferenced types that implement an interface that is used. #94- Return useful error when --stdin is specified but no schema is provided. #96
- Add
relay-connection-types-spec
rule. See README.md for details. (Thanks @ruiaraujo)
- Add support for node v6. #90 (Thanks @bwillis)
- Fix crash when no schema is provided to the linter. #88 (Thanks @ruiaraujo)
- Add support for custom rules. #79 (Thanks @bwillis)
- Fix crash when duplicate paths are passed to the linter. #82 (Thanks @boopathi)
- Add
fields-are-camel-cased
rule. #81 (Thanks @ruiaraujo) - Add
input-object-values-are-camel-cased
rule. #81 (Thanks @ruiaraujo)
- Validate configuration options and report when they are invalid. #76 (Thanks @bwillis)
- Fixed an issue where
--text
formatter was not returning the rightcolumn
for errors. #74
- Errors now include the name of the rule that caused the error. #71
- Enable
defined-types-are-used
rule. #73 (Thanks @bwillis)
- Fix a crash when running
graphql-schema-linter
. #68
- The
types-have-descriptions
rule now validates thatunion
types have a description. #56 - The
types-have-descriptions
rule now validates thatinput
types have a description. #57 - The
types-have-descriptions
rule now validates thatscalar
types have a description. #60 - The
types-have-descriptions
rule now validates thatenum
types have a description. #61 - GraphQL syntax errors will now be reported like other errors instead of crashing. #59
- Fix a crash that occured when a
.graphql
file had no line breaks. #58
- Remove dependency on
git
. #50 (Thanks @Caerbannog)
- Fix broken dependency on
cosmiconfig#3.0
. #48 (Thanks @goldcaddy77)
- Fix issue that prevented
graphql-schema-linter
from running onlts/*
version of node. #46 (Thanks @goldcaddy77)
- Fix crash when
graphql-schema-linter
is given an invalid schema. #42
- Do not require descriptions on type extension definitions. #41
- Add support for schemas that are split amongst multiple files. #39
- Add what
file
an error occurred in toJSONFormatter
output. #39
- Add
enum-values-all-caps
rule. #30 (Thanks @goldcaddy77)
- Deprecate
--only
and--except
in favour of--rules
. #29
- Add ability to configure
graphql-schema-linter
via configuration files. #26 (Thanks @goldcaddy77)
- Fix a bug where the wrong location (column/line) was being reported for
DeprecationsHaveAReason
rule. #13 - Fix a bug where the wrong location (column/line) was being reported for
TypesAreCapitalized
rule. #14
- Add
defined-types-are-used
rule. #24
- Rule names passed to
--only
and--except
should now be passed in kebab-case instead of UpperCamelCase. #19
- Add
EnumValuesSortedAlphabetically
rule. #15 (Thanks @goldcaddy77)
- Add some color to
--text
output format.
- Added
--only
and--except
to control what rules get used to validate the schema. - Added
--help
and usage. - Added
--version
to obtain the version ofgraphql-schema-linter
.
- Exit code is
1
when a linter rule failed against the provided schema. Otherwise exit code will be0
.
Bogus test release.
Bogus test release.