From bdf7314204684b54919366326350adc3e492edcb Mon Sep 17 00:00:00 2001 From: Sunli Date: Fri, 7 Oct 2022 16:47:55 +0800 Subject: [PATCH] Change `SchemaBuilder::enable_suggestions` to `disable_suggestions` --- CHANGELOG.md | 2 +- src/schema.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42385fed..1e33106b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/schema.rs b/src/schema.rs index 7bcaad45..65d68430 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -219,10 +219,10 @@ impl SchemaBuilder 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 }