-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'Rule' suffix to all validation rules #2402
Conversation
Long awaited change, see this disscussion: graphql#808 (comment) Technically it's not a breaking change since only stuff exported from `graphql` and `graphql/validation` are part of public API. However, many tools/libraries depended on this "internal" imports to blacklist certain rules so in graphql#2399 I added missing exports so now you can import them like so: ``` import { ExecutableDefinitionsRule } from 'graphql/validation'; ``` Also I backported missing exports to `14.6.0` release. If this change broke your code please try to migrate it as shown above and please feel free to open an issue if you need assistance with migration.
c44c175
to
2e191d2
Compare
For additional context about this long-awaited please see this discussion: #808 (comment) |
LoneSchemaDefinitionRuleRule, | ||
UniqueOperationTypesRuleRule, | ||
UniqueTypeNamesRuleRule, | ||
UniqueEnumValueNamesRuleRule, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IvanGoncharov I'm worried there may have been a mistake via find and replace here and in other places, can you take another look please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trevor-scheer Thanks a lot for reporting 👍
Fixed it here: #2407
…#2402 Big thanks to @trevor-scheer for reporting it here: https://github.com/graphql/graphql-js/pull/2402/files#r371545963
Technically it's not a breaking change since only stuff exported from
graphql
andgraphql/validation
are part of the public API.However, many tools/libraries depended on this "internal" imports to
blacklist certain rules so in #2399 I added missing exports so now
you can import them like so:
Also, I backported missing exports to the
14.6.0
release.If this change broke your code, please try to migrate it as shown above
and please feel free to open an issue if you need assistance with migration.