Skip to content
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

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

IvanGoncharov
Copy link
Member

@IvanGoncharov IvanGoncharov commented Jan 27, 2020

Technically it's not a breaking change since only stuff exported from
graphql and graphql/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:

import { ExecutableDefinitionsRule } from 'graphql/validation';

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.

@IvanGoncharov IvanGoncharov added the PR: breaking change 💥 implementation requires increase of "major" version number label Jan 27, 2020
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.
@IvanGoncharov
Copy link
Member Author

IvanGoncharov commented Jan 27, 2020

For additional context about this long-awaited please see this discussion: #808 (comment)

Comment on lines +330 to +333
LoneSchemaDefinitionRuleRule,
UniqueOperationTypesRuleRule,
UniqueTypeNamesRuleRule,
UniqueEnumValueNamesRuleRule,
Copy link
Contributor

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?

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: breaking change 💥 implementation requires increase of "major" version number
2 participants