Change `SchemaBuilder::enable_suggestions` to `disable_suggestions`

This commit is contained in:
Sunli 2022-10-07 16:47:55 +08:00
parent c7c4891b32
commit bdf7314204
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# [4.0.15] 2022-10-01
- Skip tracing for introspection queries. [#841](https://github.com/async-graphql/async-graphql/issues/841)
- Add `SchemaBuilder::enable_suggestions` method to enable or disable field suggestions. [#1101](https://github.com/async-graphql/async-graphql/issues/1101)
- Add `SchemaBuilder::disable_suggestions` method to disable field suggestions. [#1101](https://github.com/async-graphql/async-graphql/issues/1101)
# [4.0.14] 2022-09-25

View File

@ -219,10 +219,10 @@ impl<Query, Mutation, Subscription> SchemaBuilder<Query, Mutation, Subscription>
self
}
/// Enable field suggestions, default is `true`.
/// Disable field suggestions.
#[must_use]
pub fn enable_suggestions(mut self, enable: bool) -> Self {
self.registry.enable_suggestions = enable;
pub fn disable_suggestions(mut self) -> Self {
self.registry.enable_suggestions = false;
self
}